UNPKG

mathpix-markdown-it

Version:

Mathpix-markdown-it is an open source implementation of the mathpix-markdown spec written in Typescript. It relies on the following open source libraries: MathJax v3 (to render math with SVGs), markdown-it (for standard Markdown parsing)

16 lines 611 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.validateLinkEnableFile = void 0; var BAD_PROTO_RE = /^(vbscript|javascript|data):/; var GOOD_DATA_RE = /^data:image\/(gif|png|jpeg|webp);/; var validateLinkEnableFile = function (url) { // url should be normalized at this point, and existing entities are decoded var str = url.trim().toLowerCase(); return BAD_PROTO_RE.test(str) ? GOOD_DATA_RE.test(str) ? true : false : true; }; exports.validateLinkEnableFile = validateLinkEnableFile; //# sourceMappingURL=mdOptions.js.map