@cnblogs/markdown-it-presets 1.8.0 → 1.9.0-next
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gitignore +195 -0
- package/README.adoc +80 -0
- package/math/package.json +8 -0
- package/package.json +30 -11
- package/tsconfig.base.json +17 -0
- package/tsconfig.json +4 -0
- package/tslint.json +18 -0
- package/index.d.ts +0 -1
- package/index.js +0 -18
- package/index.js.map +0 -1
- package/lib-esm/index.js +0 -2
- package/lib-esm/index.js.map +0 -1
- package/lib-esm/markdown-it-factory.js +0 -102
- package/lib-esm/markdown-it-factory.js.map +0 -1
- package/lib-esm/math/factory.js +0 -13
- package/lib-esm/math/factory.js.map +0 -1
- package/lib-esm/math/impl.js +0 -161
- package/lib-esm/math/impl.js.map +0 -1
- package/lib-esm/math/index.js +0 -3
- package/lib-esm/math/index.js.map +0 -1
- package/lib-esm/math/model.js +0 -20
- package/lib-esm/math/model.js.map +0 -1
- package/lib-esm/option.js +0 -27
- package/lib-esm/option.js.map +0 -1
- package/lib-esm/plugins/highlight-code-lines.plugin.js +0 -49
- package/lib-esm/plugins/highlight-code-lines.plugin.js.map +0 -1
- package/lib-esm/plugins/html-filter.plugin.js +0 -43
- package/lib-esm/plugins/html-filter.plugin.js.map +0 -1
- package/lib-esm/plugins/meta.js +0 -36
- package/lib-esm/plugins/meta.js.map +0 -1
- package/lib-esm/plugins/multiline-blockquote/multiline-blockquote.plugin.js +0 -11
- package/lib-esm/plugins/multiline-blockquote/multiline-blockquote.plugin.js.map +0 -1
- package/lib-esm/plugins/multiline-blockquote/multiline-blockquote.rule.js +0 -40
- package/lib-esm/plugins/multiline-blockquote/multiline-blockquote.rule.js.map +0 -1
- package/lib-esm/plugins/simple-math.plugin.js +0 -147
- package/lib-esm/plugins/simple-math.plugin.js.map +0 -1
- package/lib-esm/plugins/simple-mermaid.plugin.js +0 -17
- package/lib-esm/plugins/simple-mermaid.plugin.js.map +0 -1
- package/lib-esm/plugins/toc/index.js +0 -184
- package/lib-esm/plugins/toc/index.js.map +0 -1
- package/lib-esm/plugins/toc/slugify.js +0 -5
- package/lib-esm/plugins/toc/slugify.js.map +0 -1
- package/lib-esm/plugins/toc/toc-item.js +0 -2
- package/lib-esm/plugins/toc/toc-item.js.map +0 -1
- package/lib-esm/plugins/toc/toc-option.js +0 -15
- package/lib-esm/plugins/toc/toc-option.js.map +0 -1
- package/lib-esm/plugins/unique-custom-id.js +0 -27
- package/lib-esm/plugins/unique-custom-id.js.map +0 -1
- package/lib-esm/tsconfig.tsbuildinfo +0 -1
- package/markdown-it-factory.d.ts +0 -6
- package/markdown-it-factory.js +0 -112
- package/markdown-it-factory.js.map +0 -1
- package/math/factory.d.ts +0 -2
- package/math/factory.js +0 -17
- package/math/factory.js.map +0 -1
- package/math/impl.d.ts +0 -20
- package/math/impl.js +0 -166
- package/math/impl.js.map +0 -1
- package/math/index.d.ts +0 -2
- package/math/index.js +0 -8
- package/math/index.js.map +0 -1
- package/math/model.d.ts +0 -38
- package/math/model.js +0 -23
- package/math/model.js.map +0 -1
- package/option.d.ts +0 -22
- package/option.js +0 -36
- package/option.js.map +0 -1
- package/plugins/highlight-code-lines.plugin.d.ts +0 -7
- package/plugins/highlight-code-lines.plugin.js +0 -52
- package/plugins/highlight-code-lines.plugin.js.map +0 -1
- package/plugins/html-filter.plugin.d.ts +0 -2
- package/plugins/html-filter.plugin.js +0 -47
- package/plugins/html-filter.plugin.js.map +0 -1
- package/plugins/meta.d.ts +0 -2
- package/plugins/meta.js +0 -40
- package/plugins/meta.js.map +0 -1
- package/plugins/multiline-blockquote/multiline-blockquote.plugin.d.ts +0 -7
- package/plugins/multiline-blockquote/multiline-blockquote.plugin.js +0 -15
- package/plugins/multiline-blockquote/multiline-blockquote.plugin.js.map +0 -1
- package/plugins/multiline-blockquote/multiline-blockquote.rule.d.ts +0 -2
- package/plugins/multiline-blockquote/multiline-blockquote.rule.js +0 -44
- package/plugins/multiline-blockquote/multiline-blockquote.rule.js.map +0 -1
- package/plugins/simple-math.plugin.d.ts +0 -2
- package/plugins/simple-math.plugin.js +0 -151
- package/plugins/simple-math.plugin.js.map +0 -1
- package/plugins/simple-mermaid.plugin.d.ts +0 -2
- package/plugins/simple-mermaid.plugin.js +0 -21
- package/plugins/simple-mermaid.plugin.js.map +0 -1
- package/plugins/toc/index.d.ts +0 -3
- package/plugins/toc/index.js +0 -187
- package/plugins/toc/index.js.map +0 -1
- package/plugins/toc/slugify.d.ts +0 -2
- package/plugins/toc/slugify.js +0 -8
- package/plugins/toc/slugify.js.map +0 -1
- package/plugins/toc/toc-item.d.ts +0 -9
- package/plugins/toc/toc-item.js +0 -3
- package/plugins/toc/toc-item.js.map +0 -1
- package/plugins/toc/toc-option.d.ts +0 -26
- package/plugins/toc/toc-option.js +0 -18
- package/plugins/toc/toc-option.js.map +0 -1
- package/plugins/unique-custom-id.d.ts +0 -3
- package/plugins/unique-custom-id.js +0 -30
- package/plugins/unique-custom-id.js.map +0 -1
- package/styles/task-lists.less +0 -19
- package/styles/task-lists.min.css +0 -1
- package/tsconfig.tsbuildinfo +0 -1
- package/umd/markdownItPresets.js +0 -1
- package/umd/mathRenderer.js +0 -1
package/markdown-it-factory.js
DELETED
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.HighlightCodeLinesPlugin = exports.MarkdownIt = exports.markdownItFactory = exports.MultilineBlockquoteRule = exports.MultilineBlockquotePlugin = void 0;
|
|
7
|
-
const markdown_it_1 = __importDefault(require("markdown-it"));
|
|
8
|
-
exports.MarkdownIt = markdown_it_1.default;
|
|
9
|
-
const highlight_js_1 = __importDefault(require("highlight.js"));
|
|
10
|
-
const markdown_it_container_1 = __importDefault(require("markdown-it-container"));
|
|
11
|
-
const markdown_it_abbr_1 = __importDefault(require("markdown-it-abbr"));
|
|
12
|
-
const markdown_it_deflist_1 = __importDefault(require("markdown-it-deflist"));
|
|
13
|
-
const markdown_it_emoji_1 = __importDefault(require("markdown-it-emoji"));
|
|
14
|
-
const markdown_it_footnote_1 = __importDefault(require("markdown-it-footnote"));
|
|
15
|
-
const markdown_it_mark_1 = __importDefault(require("markdown-it-mark"));
|
|
16
|
-
const markdown_it_sub_1 = __importDefault(require("markdown-it-sub"));
|
|
17
|
-
const markdown_it_sup_1 = __importDefault(require("markdown-it-sup"));
|
|
18
|
-
const markdown_it_anchor_1 = __importDefault(require("markdown-it-anchor"));
|
|
19
|
-
const markdown_it_lazy_headers_1 = __importDefault(require("markdown-it-lazy-headers"));
|
|
20
|
-
const markdown_it_for_inline_1 = __importDefault(require("markdown-it-for-inline"));
|
|
21
|
-
const markdown_it_task_lists_1 = __importDefault(require("markdown-it-task-lists"));
|
|
22
|
-
const markdown_it_attrs_1 = __importDefault(require("markdown-it-attrs"));
|
|
23
|
-
const simple_math_plugin_1 = require("./plugins/simple-math.plugin");
|
|
24
|
-
const simple_mermaid_plugin_1 = require("./plugins/simple-mermaid.plugin");
|
|
25
|
-
const html_filter_plugin_1 = require("./plugins/html-filter.plugin");
|
|
26
|
-
const multiline_blockquote_plugin_1 = require("./plugins/multiline-blockquote/multiline-blockquote.plugin");
|
|
27
|
-
Object.defineProperty(exports, "MultilineBlockquotePlugin", { enumerable: true, get: function () { return multiline_blockquote_plugin_1.MultilineBlockquotePlugin; } });
|
|
28
|
-
Object.defineProperty(exports, "MultilineBlockquoteRule", { enumerable: true, get: function () { return multiline_blockquote_plugin_1.MultilineBlockquoteRule; } });
|
|
29
|
-
const option_1 = require("./option");
|
|
30
|
-
const toc_1 = require("./plugins/toc");
|
|
31
|
-
const highlight_code_lines_plugin_1 = require("./plugins/highlight-code-lines.plugin");
|
|
32
|
-
Object.defineProperty(exports, "HighlightCodeLinesPlugin", { enumerable: true, get: function () { return highlight_code_lines_plugin_1.HighlightCodeLinesPlugin; } });
|
|
33
|
-
const meta_1 = require("./plugins/meta");
|
|
34
|
-
const unique_custom_id_1 = require("./plugins/unique-custom-id");
|
|
35
|
-
const mdUtils = new markdown_it_1.default().utils;
|
|
36
|
-
const defaultCodeHighlight = (str, lang) => {
|
|
37
|
-
if (lang && highlight_js_1.default.getLanguage(lang)) {
|
|
38
|
-
try {
|
|
39
|
-
const result = highlight_js_1.default.highlight(lang, str, true);
|
|
40
|
-
return `<pre class="hljs"><code data-lang="${result.language}">${result.value}</code></pre>`;
|
|
41
|
-
}
|
|
42
|
-
catch (_a) { }
|
|
43
|
-
}
|
|
44
|
-
return `<pre class="hljs"><code>${mdUtils.escapeHtml(str)}</code></pre>`;
|
|
45
|
-
};
|
|
46
|
-
const addLinkAttributes = [
|
|
47
|
-
markdown_it_for_inline_1.default,
|
|
48
|
-
'url_new_win',
|
|
49
|
-
'link_open',
|
|
50
|
-
(tokens, idx) => {
|
|
51
|
-
const token = tokens[idx];
|
|
52
|
-
const href = token.attrGet('href');
|
|
53
|
-
if (!href) {
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
if (!href.startsWith('#')) {
|
|
57
|
-
token.attrPush(['target', '_blank']);
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
];
|
|
61
|
-
const markdownItFactory = ({ html, codeHighlight, taskListsOption, math, disableRules, linkify: linkifyOption, } = option_1.defaultMarkdownItOption) => {
|
|
62
|
-
const mdOpt = {
|
|
63
|
-
html: html,
|
|
64
|
-
breaks: true,
|
|
65
|
-
linkify: true,
|
|
66
|
-
};
|
|
67
|
-
taskListsOption !== null && taskListsOption !== void 0 ? taskListsOption : (taskListsOption = option_1.defaultTaskListsOption);
|
|
68
|
-
linkifyOption = Object.assign({}, option_1.defaultLinkifyOptions, linkifyOption !== null && linkifyOption !== void 0 ? linkifyOption : option_1.defaultLinkifyOptions);
|
|
69
|
-
if (codeHighlight) {
|
|
70
|
-
mdOpt.highlight = defaultCodeHighlight;
|
|
71
|
-
}
|
|
72
|
-
const md = new markdown_it_1.default(mdOpt)
|
|
73
|
-
.use(markdown_it_container_1.default)
|
|
74
|
-
.use(simple_mermaid_plugin_1.diagramPlugin)
|
|
75
|
-
.use(markdown_it_attrs_1.default, { allowedAttributes: ['id', 'class', highlight_code_lines_plugin_1.LineNumberAttrRegex] })
|
|
76
|
-
.use(markdown_it_anchor_1.default, option_1.anchorOption)
|
|
77
|
-
.use(unique_custom_id_1.UniqueCustomIdAttrs)
|
|
78
|
-
.use(toc_1.TocPlugin)
|
|
79
|
-
.use(markdown_it_abbr_1.default)
|
|
80
|
-
.use(markdown_it_deflist_1.default)
|
|
81
|
-
.use(markdown_it_emoji_1.default)
|
|
82
|
-
.use(markdown_it_footnote_1.default)
|
|
83
|
-
.use(markdown_it_mark_1.default)
|
|
84
|
-
.use(markdown_it_sub_1.default)
|
|
85
|
-
.use(markdown_it_sup_1.default)
|
|
86
|
-
.use(highlight_code_lines_plugin_1.HighlightCodeLinesPlugin)
|
|
87
|
-
.use(markdown_it_lazy_headers_1.default)
|
|
88
|
-
.use(markdown_it_task_lists_1.default, taskListsOption)
|
|
89
|
-
.use(html_filter_plugin_1.HtmlFilterPlugin)
|
|
90
|
-
.use(...addLinkAttributes)
|
|
91
|
-
.use(multiline_blockquote_plugin_1.MultilineBlockquotePlugin);
|
|
92
|
-
md.block.ruler.before('hr', 'meta', meta_1.meta);
|
|
93
|
-
if (math) {
|
|
94
|
-
md.use(simple_math_plugin_1.simpleMathPlugin);
|
|
95
|
-
}
|
|
96
|
-
if (disableRules && disableRules.length > 0) {
|
|
97
|
-
md.disable(disableRules);
|
|
98
|
-
}
|
|
99
|
-
const { normalize: defaultNormalize } = md.linkify.set(linkifyOption);
|
|
100
|
-
if (linkifyOption.fuzzyLink && linkifyOption.fuzzyLinkUseHttps) {
|
|
101
|
-
md.linkify.normalize = ((match) => {
|
|
102
|
-
if (!match.schema) {
|
|
103
|
-
match.url = `https://${match.url}`;
|
|
104
|
-
return;
|
|
105
|
-
}
|
|
106
|
-
defaultNormalize(match);
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
return md;
|
|
110
|
-
};
|
|
111
|
-
exports.markdownItFactory = markdownItFactory;
|
|
112
|
-
//# sourceMappingURL=markdown-it-factory.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-it-factory.js","sourceRoot":"","sources":["../src/markdown-it-factory.ts"],"names":[],"mappings":";;;;;;AAAA,8DAA2D;AA0IvD,qBA1IG,qBAAU,CA0IH;AAzId,gEAAgC;AAChC,kFAAwD;AACxD,wEAAsC;AACtC,8EAA4C;AAC5C,0EAAwC;AACxC,gFAA8C;AAC9C,wEAAsC;AACtC,sEAAoC;AACpC,sEAAoC;AACpC,4EAA0C;AAC1C,wFAAmD;AACnD,oFAA0D;AAC1D,oFAAuD;AACvD,0EAAgD;AAEhD,qEAAgE;AAChE,2EAAgE;AAEhE,qEAAgE;AAChE,4GAIoE;AA8GhE,0GAhHA,uDAAyB,OAgHA;AACzB,wGAhHA,qDAAuB,OAgHA;AA9G3B,qCAMkB;AAClB,uCAA0C;AAC1C,uFAI+C;AAuG3C,yGAzGA,sDAAwB,OAyGA;AAtG5B,yCAAsC;AACtC,iEAAiE;AAEjE,MAAM,OAAO,GAAG,IAAI,qBAAU,EAAE,CAAC,KAAK,CAAC;AAEvC,MAAM,oBAAoB,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;IACvC,IAAI,IAAI,IAAI,sBAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE;QAChC,IAAI;YACA,MAAM,MAAM,GAAG,sBAAI,CAAC,SAAS,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;YAC/C,OAAO,sCAAsC,MAAM,CAAC,QAAQ,KAAK,MAAM,CAAC,KAAK,eAAe,CAAC;SAChG;QAAC,WAAM,GAAE;KACb;IACD,OAAO,2BAA2B,OAAO,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AAK,CAAC,CAAC;QACrC,CAAC,CAAQ,CAAC;KACb;IAED,OAAO,EAAE,CAAC;AACd,CAAC,CAAC;AAME,8CAAiB"}
|
package/math/factory.d.ts
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { IMathRenderer, MathEngine, MathJax2RendererConfig, MathJax3RendererConfig } from './model';
|
|
2
|
-
export declare const createMathJaxRenderer: <T extends Partial<MathJax2RendererConfig | MathJax3RendererConfig>>(rendererConfig: T) => IMathRenderer<MathEngine.MathJax2> | IMathRenderer<MathEngine.MathJax3>;
|
package/math/factory.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createMathJaxRenderer = void 0;
|
|
4
|
-
const model_1 = require("./model");
|
|
5
|
-
const impl_1 = require("./impl");
|
|
6
|
-
const createMathJaxRenderer = (rendererConfig) => {
|
|
7
|
-
switch (rendererConfig.engine) {
|
|
8
|
-
case model_1.MathEngine.MathJax2:
|
|
9
|
-
return new impl_1.Mathjax2Renderer().config(rendererConfig);
|
|
10
|
-
case model_1.MathEngine.MathJax3:
|
|
11
|
-
return new impl_1.MathJax3Renderer().config(rendererConfig);
|
|
12
|
-
default:
|
|
13
|
-
throw Error('Renderer unavailable');
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
exports.createMathJaxRenderer = createMathJaxRenderer;
|
|
17
|
-
//# sourceMappingURL=factory.js.map
|
package/math/factory.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"factory.js","sourceRoot":"","sources":["../../src/math/factory.ts"],"names":[],"mappings":";;;AAAA,mCAAoG;AACpG,iCAA4D;AAErD,MAAM,qBAAqB,GAAG,CACjC,cAAiB,EACsD,EAAE;IACzE,QAAQ,cAAc,CAAC,MAAM,EAAE;QAC3B,KAAK,kBAAU,CAAC,QAAQ;YACpB,OAAO,IAAI,uBAAgB,EAAE,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;QACzD,KAAK,kBAAU,CAAC,QAAQ;YACpB,OAAO,IAAI,uBAAgB,EAAE,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;QACzD;YACI,MAAM,KAAK,CAAC,sBAAsB,CAAC,CAAC;KAC3C;AACL,CAAC,CAAC;AAXW,QAAA,qBAAqB,yBAWhC"}
|
package/math/impl.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { IMathRenderer, MathEngine, MathJax2RendererConfig, MathJax3RendererConfig } from './model';
|
|
2
|
-
export declare class Mathjax2Renderer implements IMathRenderer<MathEngine.MathJax2> {
|
|
3
|
-
private readonly _defaultConfig;
|
|
4
|
-
private readonly _defaultMathJaxConfig;
|
|
5
|
-
private _config;
|
|
6
|
-
private _initTask?;
|
|
7
|
-
private get _global();
|
|
8
|
-
render(container: HTMLElement, callback?: () => unknown): Promise<void>;
|
|
9
|
-
config(value: Partial<MathJax2RendererConfig>): this;
|
|
10
|
-
private init;
|
|
11
|
-
}
|
|
12
|
-
export declare class MathJax3Renderer implements IMathRenderer<MathEngine.MathJax3> {
|
|
13
|
-
private readonly _defaultConfig;
|
|
14
|
-
private readonly _defaultMathJaxConfig;
|
|
15
|
-
private _config;
|
|
16
|
-
private _initTask?;
|
|
17
|
-
config(value: Partial<MathJax3RendererConfig>): this;
|
|
18
|
-
render(container: HTMLElement, callback?: () => unknown): Promise<void>;
|
|
19
|
-
private init;
|
|
20
|
-
}
|
package/math/impl.js
DELETED
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MathJax3Renderer = exports.Mathjax2Renderer = void 0;
|
|
4
|
-
const model_1 = require("./model");
|
|
5
|
-
const lodash_es_1 = require("lodash-es");
|
|
6
|
-
const load_script_css_1 = require("@cnblogs/load-script-css");
|
|
7
|
-
class Mathjax2Renderer {
|
|
8
|
-
constructor() {
|
|
9
|
-
this._defaultConfig = model_1.defaultConfig[model_1.MathEngine.MathJax2];
|
|
10
|
-
this._defaultMathJaxConfig = {
|
|
11
|
-
tex2jax: {
|
|
12
|
-
inlineMath: [
|
|
13
|
-
['$', '$'],
|
|
14
|
-
['\\(', '\\)'],
|
|
15
|
-
],
|
|
16
|
-
processClass: 'math',
|
|
17
|
-
processEscapes: true,
|
|
18
|
-
},
|
|
19
|
-
TeX: {
|
|
20
|
-
equationNumbers: {
|
|
21
|
-
autoNumber: 'AMS',
|
|
22
|
-
useLabelIds: true,
|
|
23
|
-
},
|
|
24
|
-
extensions: ['extpfeil.js', 'mediawiki-texvc.js'],
|
|
25
|
-
Macros: { bm: '\\boldsymbol' },
|
|
26
|
-
},
|
|
27
|
-
'HTML-CSS': { linebreaks: { automatic: true } },
|
|
28
|
-
SVG: { linebreaks: { automatic: true } },
|
|
29
|
-
skipStartupTypeset: true,
|
|
30
|
-
};
|
|
31
|
-
this._config = this._defaultConfig;
|
|
32
|
-
}
|
|
33
|
-
get _global() {
|
|
34
|
-
var _a;
|
|
35
|
-
return ((_a = this._config.document.defaultView) !== null && _a !== void 0 ? _a : window);
|
|
36
|
-
}
|
|
37
|
-
render(container, callback) {
|
|
38
|
-
if (!this._config.isEnabled)
|
|
39
|
-
return Promise.resolve();
|
|
40
|
-
return this.init()
|
|
41
|
-
.then(mathjax => {
|
|
42
|
-
if (!mathjax)
|
|
43
|
-
return;
|
|
44
|
-
const { onRendered } = this._config;
|
|
45
|
-
mathjax.Hub.Queue(['Typeset', mathjax.Hub, container]);
|
|
46
|
-
if (onRendered != null) {
|
|
47
|
-
mathjax.Hub.Queue(() => onRendered(mathjax));
|
|
48
|
-
}
|
|
49
|
-
if (callback) {
|
|
50
|
-
mathjax.Hub.Queue(callback);
|
|
51
|
-
}
|
|
52
|
-
})
|
|
53
|
-
.catch(console.warn);
|
|
54
|
-
}
|
|
55
|
-
config(value) {
|
|
56
|
-
this._config = (0, lodash_es_1.merge)({}, this._defaultConfig, value);
|
|
57
|
-
return this;
|
|
58
|
-
}
|
|
59
|
-
init() {
|
|
60
|
-
if (this._initTask)
|
|
61
|
-
return this._initTask;
|
|
62
|
-
const { entryScript, tapMathJaxConfig, document } = this._config;
|
|
63
|
-
return (this._initTask = (0, load_script_css_1.loadScript)({
|
|
64
|
-
src: entryScript,
|
|
65
|
-
id: 'mathjax',
|
|
66
|
-
timeoutSeconds: 10,
|
|
67
|
-
appendTo: document.head,
|
|
68
|
-
})
|
|
69
|
-
.then(() => {
|
|
70
|
-
var _a;
|
|
71
|
-
const { MathJax } = this._global;
|
|
72
|
-
if (MathJax) {
|
|
73
|
-
MathJax.Hub.Config((_a = tapMathJaxConfig === null || tapMathJaxConfig === void 0 ? void 0 : tapMathJaxConfig.call(undefined, Object.assign({}, this._defaultMathJaxConfig))) !== null && _a !== void 0 ? _a : Object.assign({}, this._defaultMathJaxConfig));
|
|
74
|
-
MathJax.Hub.Configured();
|
|
75
|
-
return MathJax;
|
|
76
|
-
}
|
|
77
|
-
})
|
|
78
|
-
.catch(() => (this._initTask = undefined)));
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
exports.Mathjax2Renderer = Mathjax2Renderer;
|
|
82
|
-
class MathJax3Renderer {
|
|
83
|
-
constructor() {
|
|
84
|
-
this._defaultConfig = model_1.defaultConfig[model_1.MathEngine.MathJax3];
|
|
85
|
-
this._defaultMathJaxConfig = {
|
|
86
|
-
tex: {
|
|
87
|
-
inlineMath: [
|
|
88
|
-
['$', '$'],
|
|
89
|
-
['\\(', '\\)'],
|
|
90
|
-
],
|
|
91
|
-
processEscapes: true,
|
|
92
|
-
tags: 'ams',
|
|
93
|
-
useLabelIds: true,
|
|
94
|
-
macros: {
|
|
95
|
-
bm: '\\boldsymbol',
|
|
96
|
-
},
|
|
97
|
-
packages: { '[+]': ['noerrors', 'extpfeil'] },
|
|
98
|
-
},
|
|
99
|
-
options: {
|
|
100
|
-
processHtmlClass: 'math',
|
|
101
|
-
ignoreHtmlClass: 'tex2jax_ignore',
|
|
102
|
-
},
|
|
103
|
-
loader: {
|
|
104
|
-
load: ['[tex]/noerrors', '[tex]/extpfeil'],
|
|
105
|
-
},
|
|
106
|
-
startup: {
|
|
107
|
-
typeset: false,
|
|
108
|
-
},
|
|
109
|
-
};
|
|
110
|
-
this._config = this._defaultConfig;
|
|
111
|
-
}
|
|
112
|
-
config(value) {
|
|
113
|
-
this._config = (0, lodash_es_1.merge)({}, this._defaultConfig, value);
|
|
114
|
-
return this;
|
|
115
|
-
}
|
|
116
|
-
render(container, callback) {
|
|
117
|
-
if (!this._config.isEnabled)
|
|
118
|
-
return Promise.resolve();
|
|
119
|
-
return this.init()
|
|
120
|
-
.then(mathjax => {
|
|
121
|
-
mathjax
|
|
122
|
-
? (mathjax.startup.promise = mathjax.startup.promise.then(() => mathjax.typesetPromise([container]).then(() => {
|
|
123
|
-
var _a;
|
|
124
|
-
try {
|
|
125
|
-
(_a = this._config.onRendered) === null || _a === void 0 ? void 0 : _a.call(undefined, mathjax);
|
|
126
|
-
}
|
|
127
|
-
catch (e) {
|
|
128
|
-
console.error(e);
|
|
129
|
-
}
|
|
130
|
-
try {
|
|
131
|
-
callback === null || callback === void 0 ? void 0 : callback.call(undefined);
|
|
132
|
-
}
|
|
133
|
-
catch (e) {
|
|
134
|
-
console.error(e);
|
|
135
|
-
}
|
|
136
|
-
})))
|
|
137
|
-
: undefined;
|
|
138
|
-
})
|
|
139
|
-
.catch(console.warn);
|
|
140
|
-
}
|
|
141
|
-
init() {
|
|
142
|
-
var _a;
|
|
143
|
-
return ((_a = this._initTask) !== null && _a !== void 0 ? _a : (this._initTask = new Promise((resolve, reject) => {
|
|
144
|
-
var _a, _b;
|
|
145
|
-
const { entryScript, tapMathJaxConfig, document: _document } = this._config;
|
|
146
|
-
const _window = ((_a = _document.defaultView) !== null && _a !== void 0 ? _a : window);
|
|
147
|
-
_window.MathJax = (_b = tapMathJaxConfig === null || tapMathJaxConfig === void 0 ? void 0 : tapMathJaxConfig.call(undefined, Object.assign({}, this._defaultMathJaxConfig))) !== null && _b !== void 0 ? _b : Object.assign({}, this._defaultMathJaxConfig);
|
|
148
|
-
if (!_window.MathJax.startup) {
|
|
149
|
-
_window.MathJax.startup = {};
|
|
150
|
-
}
|
|
151
|
-
_window.MathJax.startup.ready = () => {
|
|
152
|
-
var _a, _b;
|
|
153
|
-
(_b = (_a = _window.MathJax) === null || _a === void 0 ? void 0 : _a.startup) === null || _b === void 0 ? void 0 : _b.defaultReady();
|
|
154
|
-
resolve(_window.MathJax);
|
|
155
|
-
};
|
|
156
|
-
(0, load_script_css_1.loadScript)({
|
|
157
|
-
src: entryScript,
|
|
158
|
-
id: 'mathjax',
|
|
159
|
-
executionStrategy: 'defer',
|
|
160
|
-
appendTo: _window.document.head,
|
|
161
|
-
}).catch(reject);
|
|
162
|
-
}))).catch(() => (this._initTask = undefined));
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
exports.MathJax3Renderer = MathJax3Renderer;
|
|
166
|
-
//# sourceMappingURL=impl.js.map
|
package/math/impl.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"impl.js","sourceRoot":"","sources":["../../src/math/impl.ts"],"names":[],"mappings":";;;AAAA,mCAQiB;AACjB,yCAAkC;AAClC,8DAAsD;AAEtD,MAAa,gBAAgB;IAA7B;QACqB,mBAAc,GAAG,qBAAa,CAAC,kBAAU,CAAC,QAAQ,CAAC,CAAC;QACpD,0BAAqB,GAAmB;YACrD,OAAO,EAAE;gBACL,UAAU,EAAE;oBACR,CAAC,GAAG,EAAE,GAAG,CAAC;oBACV,CAAC,KAAK,EAAE,KAAK,CAAC;iBACjB;gBACD,YAAY,EAAE,MAAM;gBACpB,cAAc,EAAE,IAAI;aACvB;YACD,GAAG,EAAE;gBACD,eAAe,EAAE;oBACb,UAAU,EAAE,KAAK;oBACjB,WAAW,EAAE,IAAI;iBACpB;gBACD,UAAU,EAAE,CAAC,aAAa,EAAE,oB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,EAAE,OAAO;gBAC1B,QAAQ,EAAE,OAAO,CAAC,QAAQ,CAAC,IAAI;aAClC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QACrB,CAAC,CAAC,EAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC,CAAC,CAAC;IAClD,CAAC;CACJ;AAvFD,4CAuFC"}
|
package/math/index.d.ts
DELETED
package/math/index.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MathEngine = exports.createMathJaxRenderer = void 0;
|
|
4
|
-
var factory_1 = require("./factory");
|
|
5
|
-
Object.defineProperty(exports, "createMathJaxRenderer", { enumerable: true, get: function () { return factory_1.createMathJaxRenderer; } });
|
|
6
|
-
var model_1 = require("./model");
|
|
7
|
-
Object.defineProperty(exports, "MathEngine", { enumerable: true, get: function () { return model_1.MathEngine; } });
|
|
8
|
-
//# sourceMappingURL=index.js.map
|
package/math/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/math/index.ts"],"names":[],"mappings":";;;AAAA,qCAAkD;AAAzC,gHAAA,qBAAqB,OAAA;AAC9B,iCAAoH;AAA5F,mGAAA,UAAU,OAAA"}
|
package/math/model.d.ts
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/// <reference types="mathjax2" />
|
|
2
|
-
import { MathJaxObject as StartupObject, MathJaxConfig as MJStartupConfig } from 'mathjax-full/js/components/startup';
|
|
3
|
-
export declare type MathJaxConfig = MJStartupConfig & {
|
|
4
|
-
tex: Record<string, unknown>;
|
|
5
|
-
[name: string]: unknown;
|
|
6
|
-
};
|
|
7
|
-
export declare interface MathJaxObject {
|
|
8
|
-
config: MathJaxConfig;
|
|
9
|
-
startup: StartupObject['startup'];
|
|
10
|
-
typeset(arg: unknown[]): void;
|
|
11
|
-
typesetPromise(arg: unknown[]): Promise<void>;
|
|
12
|
-
}
|
|
13
|
-
export declare enum MathEngine {
|
|
14
|
-
MathJax2 = 0,
|
|
15
|
-
MathJax3 = 1
|
|
16
|
-
}
|
|
17
|
-
export interface RendererConfig<TEngine extends MathEngine> {
|
|
18
|
-
engine: MathEngine;
|
|
19
|
-
entryScript: string;
|
|
20
|
-
document: Document;
|
|
21
|
-
isEnabled: boolean;
|
|
22
|
-
onRendered?: (mathjax: TEngine extends MathEngine.MathJax2 ? typeof MathJax : MathJaxObject) => void | Promise<void>;
|
|
23
|
-
tapMathJaxConfig?: <TConfig = TEngine extends MathEngine.MathJax2 ? MathJax.Config : MathJaxConfig>(config: TConfig) => TConfig;
|
|
24
|
-
}
|
|
25
|
-
export declare type MathJax2RendererConfig = RendererConfig<MathEngine.MathJax2> & {
|
|
26
|
-
engine: MathEngine.MathJax2;
|
|
27
|
-
};
|
|
28
|
-
export declare type MathJax3RendererConfig = RendererConfig<MathEngine.MathJax3> & {
|
|
29
|
-
engine: MathEngine.MathJax3;
|
|
30
|
-
};
|
|
31
|
-
export declare const defaultConfig: {
|
|
32
|
-
[MathEngine.MathJax2]: MathJax2RendererConfig;
|
|
33
|
-
[MathEngine.MathJax3]: MathJax3RendererConfig;
|
|
34
|
-
};
|
|
35
|
-
export interface IMathRenderer<TEngine extends MathEngine> {
|
|
36
|
-
config(value: Partial<RendererConfig<TEngine>>): this;
|
|
37
|
-
render(container: HTMLElement, callback?: () => unknown): Promise<void>;
|
|
38
|
-
}
|
package/math/model.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.defaultConfig = exports.MathEngine = void 0;
|
|
4
|
-
var MathEngine;
|
|
5
|
-
(function (MathEngine) {
|
|
6
|
-
MathEngine[MathEngine["MathJax2"] = 0] = "MathJax2";
|
|
7
|
-
MathEngine[MathEngine["MathJax3"] = 1] = "MathJax3";
|
|
8
|
-
})(MathEngine = exports.MathEngine || (exports.MathEngine = {}));
|
|
9
|
-
exports.defaultConfig = {
|
|
10
|
-
[MathEngine.MathJax2]: {
|
|
11
|
-
entryScript: 'https://mathjax.cnblogs.com/2_7_5/MathJax.js?config=TeX-AMS-MML_HTMLorMML&delayStartupUntil=configured&v=20200504',
|
|
12
|
-
document: window.document,
|
|
13
|
-
engine: MathEngine.MathJax2,
|
|
14
|
-
isEnabled: true,
|
|
15
|
-
},
|
|
16
|
-
[MathEngine.MathJax3]: {
|
|
17
|
-
entryScript: 'https://mathjax.cnblogs.com/3_2_1/es5/tex-mml-chtml.js',
|
|
18
|
-
document: window.document,
|
|
19
|
-
engine: MathEngine.MathJax3,
|
|
20
|
-
isEnabled: true,
|
|
21
|
-
},
|
|
22
|
-
};
|
|
23
|
-
//# sourceMappingURL=model.js.map
|
package/math/model.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../src/math/model.ts"],"names":[],"mappings":";;;AAgBA,IAAY,UAGX;AAHD,WAAY,UAAU;IAClB,mDAAY,CAAA;IACZ,mDAAY,CAAA;AAChB,CAAC,EAHW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAGrB;AAsBY,QAAA,aAAa,GAGtB;IACA,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE;QACnB,WAAW,EACP,mHAAmH;QACvH,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,MAAM,EAAE,UAAU,CAAC,QAAQ;QAC3B,SAAS,EAAE,IAAI;KAClB;IACD,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE;QACnB,WAAW,EAAE,wDAAwD;QACrE,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,MAAM,EAAE,UAAU,CAAC,QAAQ;QAC3B,SAAS,EAAE,IAAI;KAClB;CACJ,CAAC"}
|
package/option.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import MdAnchor from 'markdown-it-anchor';
|
|
2
|
-
interface TaskListsOption {
|
|
3
|
-
enable: boolean;
|
|
4
|
-
label: boolean;
|
|
5
|
-
labelAfter: boolean;
|
|
6
|
-
}
|
|
7
|
-
declare type LinkifyOption = import('linkify-it').Options & {
|
|
8
|
-
fuzzyLinkUseHttps?: boolean;
|
|
9
|
-
};
|
|
10
|
-
interface MarkdownItPresetOption {
|
|
11
|
-
codeHighlight: boolean;
|
|
12
|
-
math: boolean;
|
|
13
|
-
html: boolean;
|
|
14
|
-
disableRules: string[];
|
|
15
|
-
taskListsOption?: TaskListsOption;
|
|
16
|
-
linkify?: LinkifyOption;
|
|
17
|
-
}
|
|
18
|
-
declare const defaultTaskListsOption: TaskListsOption;
|
|
19
|
-
declare const defaultMarkdownItOption: MarkdownItPresetOption;
|
|
20
|
-
declare const defaultLinkifyOptions: LinkifyOption;
|
|
21
|
-
declare const anchorOption: MdAnchor.AnchorOptions;
|
|
22
|
-
export { TaskListsOption, MarkdownItPresetOption, defaultTaskListsOption, defaultMarkdownItOption, defaultLinkifyOptions, anchorOption, };
|
package/option.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.anchorOption = exports.defaultLinkifyOptions = exports.defaultMarkdownItOption = exports.defaultTaskListsOption = void 0;
|
|
7
|
-
const github_slugger_1 = __importDefault(require("github-slugger"));
|
|
8
|
-
const defaultTaskListsOption = {
|
|
9
|
-
enable: true,
|
|
10
|
-
label: true,
|
|
11
|
-
labelAfter: true,
|
|
12
|
-
};
|
|
13
|
-
exports.defaultTaskListsOption = defaultTaskListsOption;
|
|
14
|
-
const defaultMarkdownItOption = {
|
|
15
|
-
codeHighlight: false,
|
|
16
|
-
math: false,
|
|
17
|
-
disableRules: [],
|
|
18
|
-
html: false,
|
|
19
|
-
taskListsOption: defaultTaskListsOption,
|
|
20
|
-
};
|
|
21
|
-
exports.defaultMarkdownItOption = defaultMarkdownItOption;
|
|
22
|
-
const defaultLinkifyOptions = {
|
|
23
|
-
fuzzyEmail: false,
|
|
24
|
-
fuzzyLink: false,
|
|
25
|
-
fuzzyLinkUseHttps: true,
|
|
26
|
-
};
|
|
27
|
-
exports.defaultLinkifyOptions = defaultLinkifyOptions;
|
|
28
|
-
const anchorOption = {
|
|
29
|
-
level: 1,
|
|
30
|
-
slugify(str) {
|
|
31
|
-
const result = new github_slugger_1.default().slug(str);
|
|
32
|
-
return result === '' ? '_' : result;
|
|
33
|
-
},
|
|
34
|
-
};
|
|
35
|
-
exports.anchorOption = anchorOption;
|
|
36
|
-
//# sourceMappingURL=option.js.map
|
package/option.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"option.js","sourceRoot":"","sources":["../src/option.ts"],"names":[],"mappings":";;;;;;AACA,oEAA2C;AAmC3C,MAAM,sBAAsB,GAAoB;IAC5C,MAAM,EAAE,IAAI;IACZ,KAAK,EAAE,IAAI;IACX,UAAU,EAAE,IAAI;CACnB,CAAC;AA2BE,wDAAsB;AAzB1B,MAAM,uBAAuB,GAA2B;IACpD,aAAa,EAAE,KAAK;IACpB,IAAI,EAAE,KAAK;IACX,YAAY,EAAE,EAAE;IAChB,IAAI,EAAE,KAAK;IACX,eAAe,EAAE,sBAAsB;CAC1C,CAAC;AAoBE,0DAAuB;AAlB3B,MAAM,qBAAqB,GAAkB;IACzC,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE,KAAK;IAChB,iBAAiB,EAAE,IAAI;CAC1B,CAAC;AAeE,sDAAqB;AAbzB,MAAM,YAAY,GAA2B;IACzC,KAAK,EAAE,CAAC;IACR,OAAO,CAAC,GAAW;QACf,MAAM,MAAM,GAAG,IAAI,wBAAa,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC7C,OAAO,MAAM,KAAK,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC;IACxC,CAAC;CACJ,CAAC;AAQE,oCAAY"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import MarkdownIt, { PluginWithOptions } from 'markdown-it';
|
|
2
|
-
export declare const LineNumberAttrRegex: RegExp;
|
|
3
|
-
interface HighlightCodeLinesOptions {
|
|
4
|
-
enable?: (md: MarkdownIt) => boolean;
|
|
5
|
-
}
|
|
6
|
-
declare const highlightCodeLines: PluginWithOptions<HighlightCodeLinesOptions>;
|
|
7
|
-
export { HighlightCodeLinesOptions, highlightCodeLines as HighlightCodeLinesPlugin };
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.HighlightCodeLinesPlugin = exports.LineNumberAttrRegex = void 0;
|
|
4
|
-
const LineNumbersRegex = /{([\d,\s-]+)}/;
|
|
5
|
-
exports.LineNumberAttrRegex = /^([\d,\s-]+)/;
|
|
6
|
-
const highlightCodeLines = (md, { enable } = {}) => {
|
|
7
|
-
const fence = md.renderer.rules.fence;
|
|
8
|
-
md.renderer.rules.fence = (tokens, idx, options, env, self) => {
|
|
9
|
-
const token = tokens[idx];
|
|
10
|
-
if ((enable != null && !enable(md)) ||
|
|
11
|
-
token.attrs == null ||
|
|
12
|
-
token.attrs.some(([attr]) => exports.LineNumberAttrRegex.test(attr)) === false) {
|
|
13
|
-
return fence(tokens, idx, options, env, self);
|
|
14
|
-
}
|
|
15
|
-
let highlightedLines = [];
|
|
16
|
-
try {
|
|
17
|
-
highlightedLines = Array.from(new Set(token.attrs
|
|
18
|
-
.map(([attr]) => attr.split(',').map(x => x.trim()))
|
|
19
|
-
.flat()
|
|
20
|
-
.filter(attr => attr != null && attr.length > 0 && exports.LineNumberAttrRegex.test(attr))
|
|
21
|
-
.map(v => {
|
|
22
|
-
let [start, end] = v.split(/\s*?-\s*?/).map(v => parseInt(v.trim(), 10));
|
|
23
|
-
start = start > 0 ? start : 1;
|
|
24
|
-
end = end > start ? end : start;
|
|
25
|
-
const paddedArr = new Array((start > end ? start - end : end - start) + 1).fill(0);
|
|
26
|
-
paddedArr.forEach((_, idx) => {
|
|
27
|
-
paddedArr[idx] = start + idx;
|
|
28
|
-
});
|
|
29
|
-
return paddedArr;
|
|
30
|
-
})
|
|
31
|
-
.flat()));
|
|
32
|
-
}
|
|
33
|
-
catch (ex) {
|
|
34
|
-
console.warn(ex);
|
|
35
|
-
}
|
|
36
|
-
const langName = token.info.replace(LineNumbersRegex, '').trim();
|
|
37
|
-
let code = md.utils.escapeHtml(token.content);
|
|
38
|
-
code = options.highlight ? options.highlight(code, langName, '') : code;
|
|
39
|
-
const tmpToken = Object.assign(token, {
|
|
40
|
-
attrs: [
|
|
41
|
-
['class', langName ? `language-${langName}` : ''],
|
|
42
|
-
highlightedLines && highlightedLines.length > 0
|
|
43
|
-
? ['data-lines-highlight', `[${highlightedLines.join(',')}]`]
|
|
44
|
-
: [],
|
|
45
|
-
],
|
|
46
|
-
});
|
|
47
|
-
const attrs = self.renderAttrs(tmpToken);
|
|
48
|
-
return `<pre${attrs}><code${attrs}>${code.trim()}</code></pre>`;
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
exports.HighlightCodeLinesPlugin = highlightCodeLines;
|
|
52
|
-
//# sourceMappingURL=highlight-code-lines.plugin.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"highlight-code-lines.plugin.js","sourceRoot":"","sources":["../../src/plugins/highlight-code-lines.plugin.ts"],"names":[],"mappings":";;;AAGA,MAAM,gBAAgB,GAAG,eAAe,CAAC;AAC5B,QAAA,mBAAmB,GAAG,cAAc,CAAC;AAMlD,MAAM,kBAAkB,GAAiD,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,E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AO,EAAE,QAAQ,CAAC,CAAC,CAAC,YAAY,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;gBACjD,gBAAgB,IAAI,gBAAgB,CAAC,MAAM,GAAG,CAAC;oBAC3C,CAAC,CAAC,CAAC,sBAAsB,EAAE,IAAI,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;oBAC7D,CAAC,CAAC,EAAE;aACX;SACK,CAAC,CAAC;QACZ,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;QACzC,OAAO,OAAO,KAAK,SAAS,KAAK,IAAI,IAAI,CAAC,IAAI,EAAE,eAAe,CAAC;IACpE,CAAC,CAAC;AACN,CAAC,CAAC;AAEwD,sDAAwB"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.HtmlFilterPlugin = void 0;
|
|
4
|
-
const tagFilterRules = {
|
|
5
|
-
title: { rule: 'escape' },
|
|
6
|
-
head: { rule: 'escape' },
|
|
7
|
-
body: { rule: 'escape' },
|
|
8
|
-
img: {
|
|
9
|
-
rule: 'filterAttributes',
|
|
10
|
-
disabledAttributes: ['onerror'],
|
|
11
|
-
},
|
|
12
|
-
};
|
|
13
|
-
const HtmlFilterPlugin = md => {
|
|
14
|
-
const defaultHtmlBlock = md.renderer.rules.html_block;
|
|
15
|
-
md.renderer.rules.html_block = (tokens, idx, options, env, self) => {
|
|
16
|
-
const token = tokens[idx];
|
|
17
|
-
if (token.type === 'html_block' && !token.tag) {
|
|
18
|
-
let { content } = token;
|
|
19
|
-
for (let tagName in tagFilterRules) {
|
|
20
|
-
const rule = tagFilterRules[tagName];
|
|
21
|
-
const { rule: handleStrategy, disabledAttributes } = rule;
|
|
22
|
-
if (handleStrategy === 'escape') {
|
|
23
|
-
const start = `<${tagName}>`;
|
|
24
|
-
const end = `</${tagName}>`;
|
|
25
|
-
const matchStart = content.replace(new RegExp('\n', 'g'), '').startsWith(start);
|
|
26
|
-
const matchEnd = content.replace(new RegExp('\n', 'g'), '').endsWith(end);
|
|
27
|
-
if (matchStart || matchEnd) {
|
|
28
|
-
content = md.utils.escapeHtml(content);
|
|
29
|
-
break;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
else if (handleStrategy === 'filterAttributes' &&
|
|
33
|
-
disabledAttributes != null &&
|
|
34
|
-
disabledAttributes.length > 0) {
|
|
35
|
-
for (let attribute of disabledAttributes) {
|
|
36
|
-
content = content.replace(new RegExp(`(<${tagName}.*? +)(${attribute}=)(.*?>)`, 'ig'), (match, p1, p2, p3) => p1 + 'data-' + p2 + p3);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
if (content !== token.content)
|
|
41
|
-
return content;
|
|
42
|
-
}
|
|
43
|
-
return defaultHtmlBlock(tokens, idx, options, env, self);
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
exports.HtmlFilterPlugin = HtmlFilterPlugin;
|
|
47
|
-
//# sourceMappingURL=html-filter.plugin.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"html-filter.plugin.js","sourceRoot":"","sources":["../../src/plugins/html-filter.plugin.ts"],"names":[],"mappings":";;;AAOA,MAAM,cAAc,GAA0C;IAC1D,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IACzB,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IACxB,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IACxB,GAAG,EAAE;QACD,IAAI,EAAE,kBAAkB;QACxB,kBAAkB,EAAE,CAAC,SAAS,CAAC;KAClC;CACJ,CAAC;AACK,MAAM,gBAAgB,GAAiB,EAAE,CAAC,EAAE;IAC/C,MAAM,gBAAgB,GAAG,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,UAAU,CAAC;IACtD,EAAE,CAAC,Q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