@emblemvault/hustle-react 1.5.11 → 1.5.13
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/README.md +2 -2
- package/dist/browser/hustle-react.js +236 -205
- package/dist/browser/hustle-react.js.map +1 -1
- package/package.json +3 -3
|
@@ -31,9 +31,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
31
31
|
));
|
|
32
32
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
33
33
|
|
|
34
|
-
// node_modules
|
|
34
|
+
// ../../node_modules/highlight.js/lib/core.js
|
|
35
35
|
var require_core = __commonJS({
|
|
36
|
-
"node_modules
|
|
36
|
+
"../../node_modules/highlight.js/lib/core.js"(exports$1, module) {
|
|
37
37
|
function deepFreeze(obj) {
|
|
38
38
|
if (obj instanceof Map) {
|
|
39
39
|
obj.clear = obj.delete = obj.set = function() {
|
|
@@ -4776,15 +4776,15 @@ var animations = `
|
|
|
4776
4776
|
}
|
|
4777
4777
|
`;
|
|
4778
4778
|
|
|
4779
|
-
// node_modules
|
|
4780
|
-
function
|
|
4779
|
+
// ../../node_modules/marked/lib/marked.esm.js
|
|
4780
|
+
function M() {
|
|
4781
4781
|
return { async: false, breaks: false, extensions: null, gfm: true, hooks: null, pedantic: false, renderer: null, silent: false, tokenizer: null, walkTokens: null };
|
|
4782
4782
|
}
|
|
4783
|
-
var
|
|
4784
|
-
function
|
|
4785
|
-
|
|
4783
|
+
var O = M();
|
|
4784
|
+
function G(u3) {
|
|
4785
|
+
O = u3;
|
|
4786
4786
|
}
|
|
4787
|
-
var
|
|
4787
|
+
var _ = { exec: () => null };
|
|
4788
4788
|
function k(u3, e = "") {
|
|
4789
4789
|
let t = typeof u3 == "string" ? u3 : u3.source, n = { replace: (r, i) => {
|
|
4790
4790
|
let s = typeof i == "string" ? i : i.source;
|
|
@@ -4792,82 +4792,85 @@ function k(u3, e = "") {
|
|
|
4792
4792
|
}, getRegex: () => new RegExp(t, e) };
|
|
4793
4793
|
return n;
|
|
4794
4794
|
}
|
|
4795
|
-
var
|
|
4795
|
+
var be = (() => {
|
|
4796
4796
|
try {
|
|
4797
4797
|
return !!new RegExp("(?<=1)(?<!1)");
|
|
4798
4798
|
} catch {
|
|
4799
4799
|
return false;
|
|
4800
4800
|
}
|
|
4801
4801
|
})();
|
|
4802
|
-
var m = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm,
|
|
4803
|
-
var
|
|
4804
|
-
var
|
|
4805
|
-
var
|
|
4806
|
-
var
|
|
4807
|
-
var
|
|
4808
|
-
var
|
|
4809
|
-
var
|
|
4810
|
-
var
|
|
4811
|
-
var
|
|
4812
|
-
var
|
|
4813
|
-
var
|
|
4802
|
+
var m = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (u3) => new RegExp(`^( {0,3}${u3})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (u3) => new RegExp(`^ {0,${Math.min(3, u3 - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (u3) => new RegExp(`^ {0,${Math.min(3, u3 - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (u3) => new RegExp(`^ {0,${Math.min(3, u3 - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (u3) => new RegExp(`^ {0,${Math.min(3, u3 - 1)}}#`), htmlBeginRegex: (u3) => new RegExp(`^ {0,${Math.min(3, u3 - 1)}}<(?:[a-z].*>|!--)`, "i"), blockquoteBeginRegex: (u3) => new RegExp(`^ {0,${Math.min(3, u3 - 1)}}>`) };
|
|
4803
|
+
var Re = /^(?:[ \t]*(?:\n|$))+/;
|
|
4804
|
+
var Oe = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/;
|
|
4805
|
+
var Te = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/;
|
|
4806
|
+
var C = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/;
|
|
4807
|
+
var we = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/;
|
|
4808
|
+
var Q = / {0,3}(?:[*+-]|\d{1,9}[.)])/;
|
|
4809
|
+
var se = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/;
|
|
4810
|
+
var ie = k(se).replace(/bull/g, Q).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex();
|
|
4811
|
+
var ye = k(se).replace(/bull/g, Q).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex();
|
|
4812
|
+
var j = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/;
|
|
4813
|
+
var Pe = /^[^\n]+/;
|
|
4814
4814
|
var F = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/;
|
|
4815
|
-
var
|
|
4816
|
-
var
|
|
4815
|
+
var Se = k(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", F).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex();
|
|
4816
|
+
var $e = k(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Q).getRegex();
|
|
4817
4817
|
var v = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";
|
|
4818
|
-
var
|
|
4819
|
-
var
|
|
4820
|
-
var
|
|
4821
|
-
var
|
|
4822
|
-
var
|
|
4823
|
-
var
|
|
4824
|
-
var
|
|
4825
|
-
var
|
|
4826
|
-
]`).replace("lheading",
|
|
4827
|
-
var
|
|
4828
|
-
var
|
|
4829
|
-
var
|
|
4818
|
+
var U = /<!--(?:-?>|[\s\S]*?(?:-->|$))/;
|
|
4819
|
+
var _e = k("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", U).replace("tag", v).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();
|
|
4820
|
+
var oe = k(j).replace("hr", C).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex();
|
|
4821
|
+
var Le = k(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", oe).getRegex();
|
|
4822
|
+
var K = { blockquote: Le, code: Oe, def: Se, fences: Te, heading: we, hr: C, html: _e, lheading: ie, list: $e, newline: Re, paragraph: oe, table: _, text: Pe };
|
|
4823
|
+
var ne = k("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", C).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex();
|
|
4824
|
+
var Me = { ...K, lheading: ye, table: ne, paragraph: k(j).replace("hr", C).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", ne).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex() };
|
|
4825
|
+
var ze = { ...K, html: k(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", U).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: _, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: k(j).replace("hr", C).replace("heading", ` *#{1,6} *[^
|
|
4826
|
+
]`).replace("lheading", ie).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() };
|
|
4827
|
+
var Ee = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/;
|
|
4828
|
+
var Ie = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/;
|
|
4829
|
+
var ae = /^( {2,}|\\)\n(?!\s*$)/;
|
|
4830
4830
|
var Ae = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/;
|
|
4831
|
-
var
|
|
4832
|
-
var
|
|
4833
|
-
var
|
|
4834
|
-
var Ce = k(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g,
|
|
4831
|
+
var z = /[\p{P}\p{S}]/u;
|
|
4832
|
+
var H = /[\s\p{P}\p{S}]/u;
|
|
4833
|
+
var W = /[^\s\p{P}\p{S}]/u;
|
|
4834
|
+
var Ce = k(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, H).getRegex();
|
|
4835
4835
|
var le = /(?!~)[\p{P}\p{S}]/u;
|
|
4836
|
-
var
|
|
4837
|
-
var
|
|
4838
|
-
var
|
|
4839
|
-
var ue = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))
|
|
4840
|
-
var
|
|
4841
|
-
var
|
|
4836
|
+
var Be = /(?!~)[\s\p{P}\p{S}]/u;
|
|
4837
|
+
var De = /(?:[^\s\p{P}\p{S}]|~)/u;
|
|
4838
|
+
var qe = k(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", be ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex();
|
|
4839
|
+
var ue = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/;
|
|
4840
|
+
var ve = k(ue, "u").replace(/punct/g, z).getRegex();
|
|
4841
|
+
var He = k(ue, "u").replace(/punct/g, le).getRegex();
|
|
4842
4842
|
var pe = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)";
|
|
4843
|
-
var
|
|
4844
|
-
var
|
|
4845
|
-
var
|
|
4846
|
-
var
|
|
4847
|
-
var
|
|
4848
|
-
var
|
|
4849
|
-
var
|
|
4850
|
-
var
|
|
4851
|
-
var
|
|
4843
|
+
var Ze = k(pe, "gu").replace(/notPunctSpace/g, W).replace(/punctSpace/g, H).replace(/punct/g, z).getRegex();
|
|
4844
|
+
var Ge = k(pe, "gu").replace(/notPunctSpace/g, De).replace(/punctSpace/g, Be).replace(/punct/g, le).getRegex();
|
|
4845
|
+
var Ne = k("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, W).replace(/punctSpace/g, H).replace(/punct/g, z).getRegex();
|
|
4846
|
+
var Qe = k(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, z).getRegex();
|
|
4847
|
+
var je = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)";
|
|
4848
|
+
var Fe = k(je, "gu").replace(/notPunctSpace/g, W).replace(/punctSpace/g, H).replace(/punct/g, z).getRegex();
|
|
4849
|
+
var Ue = k(/\\(punct)/, "gu").replace(/punct/g, z).getRegex();
|
|
4850
|
+
var Ke = k(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex();
|
|
4851
|
+
var We = k(U).replace("(?:-->|$)", "-->").getRegex();
|
|
4852
|
+
var Xe = k("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", We).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex();
|
|
4853
|
+
var q = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/;
|
|
4854
|
+
var Je = k(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", q).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex();
|
|
4852
4855
|
var ce = k(/^!?\[(label)\]\[(ref)\]/).replace("label", q).replace("ref", F).getRegex();
|
|
4853
4856
|
var he = k(/^!?\[(ref)\](?:\[\])?/).replace("ref", F).getRegex();
|
|
4854
|
-
var
|
|
4855
|
-
var
|
|
4856
|
-
var
|
|
4857
|
-
var
|
|
4858
|
-
var
|
|
4859
|
-
var
|
|
4860
|
-
var
|
|
4861
|
-
var
|
|
4862
|
-
var
|
|
4863
|
-
var ke = (u3) =>
|
|
4864
|
-
function
|
|
4857
|
+
var Ve = k("reflink|nolink(?!\\()", "g").replace("reflink", ce).replace("nolink", he).getRegex();
|
|
4858
|
+
var re = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/;
|
|
4859
|
+
var X = { _backpedal: _, anyPunctuation: Ue, autolink: Ke, blockSkip: qe, br: ae, code: Ie, del: _, delLDelim: _, delRDelim: _, emStrongLDelim: ve, emStrongRDelimAst: Ze, emStrongRDelimUnd: Ne, escape: Ee, link: Je, nolink: he, punctuation: Ce, reflink: ce, reflinkSearch: Ve, tag: Xe, text: Ae, url: _ };
|
|
4860
|
+
var Ye = { ...X, link: k(/^!?\[(label)\]\((.*?)\)/).replace("label", q).getRegex(), reflink: k(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", q).getRegex() };
|
|
4861
|
+
var N = { ...X, emStrongRDelimAst: Ge, emStrongLDelim: He, delLDelim: Qe, delRDelim: Fe, url: k(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", re).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: k(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", re).getRegex() };
|
|
4862
|
+
var et = { ...N, br: k(ae).replace("{2,}", "*").getRegex(), text: k(N.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() };
|
|
4863
|
+
var B = { normal: K, gfm: Me, pedantic: ze };
|
|
4864
|
+
var E = { normal: X, gfm: N, breaks: et, pedantic: Ye };
|
|
4865
|
+
var tt = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" };
|
|
4866
|
+
var ke = (u3) => tt[u3];
|
|
4867
|
+
function T(u3, e) {
|
|
4865
4868
|
if (e) {
|
|
4866
4869
|
if (m.escapeTest.test(u3)) return u3.replace(m.escapeReplace, ke);
|
|
4867
4870
|
} else if (m.escapeTestNoEncode.test(u3)) return u3.replace(m.escapeReplaceNoEncode, ke);
|
|
4868
4871
|
return u3;
|
|
4869
4872
|
}
|
|
4870
|
-
function
|
|
4873
|
+
function J(u3) {
|
|
4871
4874
|
try {
|
|
4872
4875
|
u3 = encodeURI(u3).replace(m.percentDecode, "%");
|
|
4873
4876
|
} catch {
|
|
@@ -4875,7 +4878,7 @@ function X(u3) {
|
|
|
4875
4878
|
}
|
|
4876
4879
|
return u3;
|
|
4877
4880
|
}
|
|
4878
|
-
function
|
|
4881
|
+
function V(u3, e) {
|
|
4879
4882
|
let t = u3.replace(m.findPipe, (i, s, a) => {
|
|
4880
4883
|
let o = false, l = s;
|
|
4881
4884
|
for (; --l >= 0 && a[l] === "\\"; ) o = !o;
|
|
@@ -4886,7 +4889,7 @@ function J(u3, e) {
|
|
|
4886
4889
|
for (; r < n.length; r++) n[r] = n[r].trim().replace(m.slashPipe, "|");
|
|
4887
4890
|
return n;
|
|
4888
4891
|
}
|
|
4889
|
-
function
|
|
4892
|
+
function I(u3, e, t) {
|
|
4890
4893
|
let n = u3.length;
|
|
4891
4894
|
if (n === 0) return "";
|
|
4892
4895
|
let r = 0;
|
|
@@ -4905,13 +4908,21 @@ function de(u3, e) {
|
|
|
4905
4908
|
else if (u3[n] === e[1] && (t--, t < 0)) return n;
|
|
4906
4909
|
return t > 0 ? -2 : -1;
|
|
4907
4910
|
}
|
|
4908
|
-
function ge(u3, e
|
|
4911
|
+
function ge(u3, e = 0) {
|
|
4912
|
+
let t = e, n = "";
|
|
4913
|
+
for (let r of u3) if (r === " ") {
|
|
4914
|
+
let i = 4 - t % 4;
|
|
4915
|
+
n += " ".repeat(i), t += i;
|
|
4916
|
+
} else n += r, t++;
|
|
4917
|
+
return n;
|
|
4918
|
+
}
|
|
4919
|
+
function fe(u3, e, t, n, r) {
|
|
4909
4920
|
let i = e.href, s = e.title || null, a = u3[1].replace(r.other.outputLinkReplace, "$1");
|
|
4910
4921
|
n.state.inLink = true;
|
|
4911
4922
|
let o = { type: u3[0].charAt(0) === "!" ? "image" : "link", raw: t, href: i, title: s, text: a, tokens: n.inlineTokens(a) };
|
|
4912
4923
|
return n.state.inLink = false, o;
|
|
4913
4924
|
}
|
|
4914
|
-
function
|
|
4925
|
+
function nt(u3, e, t) {
|
|
4915
4926
|
let n = u3.match(t.other.indentCodeCompensation);
|
|
4916
4927
|
if (n === null) return e;
|
|
4917
4928
|
let r = n[1];
|
|
@@ -4924,12 +4935,12 @@ function Je(u3, e, t) {
|
|
|
4924
4935
|
}).join(`
|
|
4925
4936
|
`);
|
|
4926
4937
|
}
|
|
4927
|
-
var
|
|
4938
|
+
var w = class {
|
|
4928
4939
|
constructor(e) {
|
|
4929
4940
|
__publicField(this, "options");
|
|
4930
4941
|
__publicField(this, "rules");
|
|
4931
4942
|
__publicField(this, "lexer");
|
|
4932
|
-
this.options = e ||
|
|
4943
|
+
this.options = e || O;
|
|
4933
4944
|
}
|
|
4934
4945
|
space(e) {
|
|
4935
4946
|
let t = this.rules.block.newline.exec(e);
|
|
@@ -4939,14 +4950,14 @@ var y = class {
|
|
|
4939
4950
|
let t = this.rules.block.code.exec(e);
|
|
4940
4951
|
if (t) {
|
|
4941
4952
|
let n = t[0].replace(this.rules.other.codeRemoveIndent, "");
|
|
4942
|
-
return { type: "code", raw: t[0], codeBlockStyle: "indented", text: this.options.pedantic ? n :
|
|
4953
|
+
return { type: "code", raw: t[0], codeBlockStyle: "indented", text: this.options.pedantic ? n : I(n, `
|
|
4943
4954
|
`) };
|
|
4944
4955
|
}
|
|
4945
4956
|
}
|
|
4946
4957
|
fences(e) {
|
|
4947
4958
|
let t = this.rules.block.fences.exec(e);
|
|
4948
4959
|
if (t) {
|
|
4949
|
-
let n = t[0], r =
|
|
4960
|
+
let n = t[0], r = nt(n, t[3] || "", this.rules);
|
|
4950
4961
|
return { type: "code", raw: n, lang: t[2] ? t[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t[2], text: r };
|
|
4951
4962
|
}
|
|
4952
4963
|
}
|
|
@@ -4955,7 +4966,7 @@ var y = class {
|
|
|
4955
4966
|
if (t) {
|
|
4956
4967
|
let n = t[2].trim();
|
|
4957
4968
|
if (this.rules.other.endingHash.test(n)) {
|
|
4958
|
-
let r =
|
|
4969
|
+
let r = I(n, "#");
|
|
4959
4970
|
(this.options.pedantic || !r || this.rules.other.endingSpaceChar.test(r)) && (n = r.trim());
|
|
4960
4971
|
}
|
|
4961
4972
|
return { type: "heading", raw: t[0], depth: t[1].length, text: n, tokens: this.lexer.inline(n) };
|
|
@@ -4963,13 +4974,13 @@ var y = class {
|
|
|
4963
4974
|
}
|
|
4964
4975
|
hr(e) {
|
|
4965
4976
|
let t = this.rules.block.hr.exec(e);
|
|
4966
|
-
if (t) return { type: "hr", raw:
|
|
4977
|
+
if (t) return { type: "hr", raw: I(t[0], `
|
|
4967
4978
|
`) };
|
|
4968
4979
|
}
|
|
4969
4980
|
blockquote(e) {
|
|
4970
4981
|
let t = this.rules.block.blockquote.exec(e);
|
|
4971
4982
|
if (t) {
|
|
4972
|
-
let n =
|
|
4983
|
+
let n = I(t[0], `
|
|
4973
4984
|
`).split(`
|
|
4974
4985
|
`), r = "", i = "", s = [];
|
|
4975
4986
|
for (; n.length > 0; ) {
|
|
@@ -4984,21 +4995,21 @@ var y = class {
|
|
|
4984
4995
|
r = r ? `${r}
|
|
4985
4996
|
${p}` : p, i = i ? `${i}
|
|
4986
4997
|
${c}` : c;
|
|
4987
|
-
let
|
|
4988
|
-
if (this.lexer.state.top = true, this.lexer.blockTokens(c, s, true), this.lexer.state.top =
|
|
4998
|
+
let d = this.lexer.state.top;
|
|
4999
|
+
if (this.lexer.state.top = true, this.lexer.blockTokens(c, s, true), this.lexer.state.top = d, n.length === 0) break;
|
|
4989
5000
|
let h = s.at(-1);
|
|
4990
5001
|
if (h?.type === "code") break;
|
|
4991
5002
|
if (h?.type === "blockquote") {
|
|
4992
5003
|
let R = h, f = R.raw + `
|
|
4993
5004
|
` + n.join(`
|
|
4994
|
-
`),
|
|
4995
|
-
s[s.length - 1] =
|
|
5005
|
+
`), S = this.blockquote(f);
|
|
5006
|
+
s[s.length - 1] = S, r = r.substring(0, r.length - R.raw.length) + S.raw, i = i.substring(0, i.length - R.text.length) + S.text;
|
|
4996
5007
|
break;
|
|
4997
5008
|
} else if (h?.type === "list") {
|
|
4998
5009
|
let R = h, f = R.raw + `
|
|
4999
5010
|
` + n.join(`
|
|
5000
|
-
`),
|
|
5001
|
-
s[s.length - 1] =
|
|
5011
|
+
`), S = this.list(f);
|
|
5012
|
+
s[s.length - 1] = S, r = r.substring(0, r.length - h.raw.length) + S.raw, i = i.substring(0, i.length - R.raw.length) + S.raw, n = f.substring(s.at(-1).raw.length).split(`
|
|
5002
5013
|
`);
|
|
5003
5014
|
continue;
|
|
5004
5015
|
}
|
|
@@ -5016,25 +5027,25 @@ ${c}` : c;
|
|
|
5016
5027
|
let l = false, p = "", c = "";
|
|
5017
5028
|
if (!(t = s.exec(e)) || this.rules.block.hr.test(e)) break;
|
|
5018
5029
|
p = t[0], e = e.substring(p.length);
|
|
5019
|
-
let
|
|
5020
|
-
`, 1)[0]
|
|
5021
|
-
`, 1)[0], R = !
|
|
5022
|
-
if (this.options.pedantic ? (f = 2, c =
|
|
5030
|
+
let d = ge(t[2].split(`
|
|
5031
|
+
`, 1)[0], t[1].length), h = e.split(`
|
|
5032
|
+
`, 1)[0], R = !d.trim(), f = 0;
|
|
5033
|
+
if (this.options.pedantic ? (f = 2, c = d.trimStart()) : R ? f = t[1].length + 1 : (f = d.search(this.rules.other.nonSpaceChar), f = f > 4 ? 1 : f, c = d.slice(f), f += t[1].length), R && this.rules.other.blankLine.test(h) && (p += h + `
|
|
5023
5034
|
`, e = e.substring(h.length + 1), l = true), !l) {
|
|
5024
|
-
let
|
|
5035
|
+
let S = this.rules.other.nextBulletRegex(f), Y = this.rules.other.hrRegex(f), ee = this.rules.other.fencesBeginRegex(f), te = this.rules.other.headingBeginRegex(f), me = this.rules.other.htmlBeginRegex(f), xe = this.rules.other.blockquoteBeginRegex(f);
|
|
5025
5036
|
for (; e; ) {
|
|
5026
|
-
let
|
|
5037
|
+
let Z = e.split(`
|
|
5027
5038
|
`, 1)[0], A;
|
|
5028
|
-
if (h =
|
|
5039
|
+
if (h = Z, this.options.pedantic ? (h = h.replace(this.rules.other.listReplaceNesting, " "), A = h) : A = h.replace(this.rules.other.tabCharGlobal, " "), ee.test(h) || te.test(h) || me.test(h) || xe.test(h) || S.test(h) || Y.test(h)) break;
|
|
5029
5040
|
if (A.search(this.rules.other.nonSpaceChar) >= f || !h.trim()) c += `
|
|
5030
5041
|
` + A.slice(f);
|
|
5031
5042
|
else {
|
|
5032
|
-
if (R ||
|
|
5043
|
+
if (R || d.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || ee.test(d) || te.test(d) || Y.test(d)) break;
|
|
5033
5044
|
c += `
|
|
5034
5045
|
` + h;
|
|
5035
5046
|
}
|
|
5036
|
-
|
|
5037
|
-
`, e = e.substring(
|
|
5047
|
+
R = !h.trim(), p += Z + `
|
|
5048
|
+
`, e = e.substring(Z.length + 1), d = A.slice(f);
|
|
5038
5049
|
}
|
|
5039
5050
|
}
|
|
5040
5051
|
i.loose || (a ? i.loose = true : this.rules.other.doubleBlankLine.test(p) && (a = true)), i.items.push({ type: "list_item", raw: p, task: !!this.options.gfm && this.rules.other.listIsTask.test(c), loose: false, text: c, tokens: [] }), i.raw += p;
|
|
@@ -5059,7 +5070,7 @@ ${c}` : c;
|
|
|
5059
5070
|
}
|
|
5060
5071
|
}
|
|
5061
5072
|
if (!i.loose) {
|
|
5062
|
-
let p = l.tokens.filter((
|
|
5073
|
+
let p = l.tokens.filter((d) => d.type === "space"), c = p.length > 0 && p.some((d) => this.rules.other.anyLine.test(d.raw));
|
|
5063
5074
|
i.loose = c;
|
|
5064
5075
|
}
|
|
5065
5076
|
}
|
|
@@ -5084,18 +5095,21 @@ ${c}` : c;
|
|
|
5084
5095
|
table(e) {
|
|
5085
5096
|
let t = this.rules.block.table.exec(e);
|
|
5086
5097
|
if (!t || !this.rules.other.tableDelimiter.test(t[2])) return;
|
|
5087
|
-
let n =
|
|
5098
|
+
let n = V(t[1]), r = t[2].replace(this.rules.other.tableAlignChars, "").split("|"), i = t[3]?.trim() ? t[3].replace(this.rules.other.tableRowBlankLine, "").split(`
|
|
5088
5099
|
`) : [], s = { type: "table", raw: t[0], header: [], align: [], rows: [] };
|
|
5089
5100
|
if (n.length === r.length) {
|
|
5090
5101
|
for (let a of r) this.rules.other.tableAlignRight.test(a) ? s.align.push("right") : this.rules.other.tableAlignCenter.test(a) ? s.align.push("center") : this.rules.other.tableAlignLeft.test(a) ? s.align.push("left") : s.align.push(null);
|
|
5091
5102
|
for (let a = 0; a < n.length; a++) s.header.push({ text: n[a], tokens: this.lexer.inline(n[a]), header: true, align: s.align[a] });
|
|
5092
|
-
for (let a of i) s.rows.push(
|
|
5103
|
+
for (let a of i) s.rows.push(V(a, s.header.length).map((o, l) => ({ text: o, tokens: this.lexer.inline(o), header: false, align: s.align[l] })));
|
|
5093
5104
|
return s;
|
|
5094
5105
|
}
|
|
5095
5106
|
}
|
|
5096
5107
|
lheading(e) {
|
|
5097
5108
|
let t = this.rules.block.lheading.exec(e);
|
|
5098
|
-
if (t)
|
|
5109
|
+
if (t) {
|
|
5110
|
+
let n = t[1].trim();
|
|
5111
|
+
return { type: "heading", raw: t[0], depth: t[2].charAt(0) === "=" ? 1 : 2, text: n, tokens: this.lexer.inline(n) };
|
|
5112
|
+
}
|
|
5099
5113
|
}
|
|
5100
5114
|
paragraph(e) {
|
|
5101
5115
|
let t = this.rules.block.paragraph.exec(e);
|
|
@@ -5123,7 +5137,7 @@ ${c}` : c;
|
|
|
5123
5137
|
let n = t[2].trim();
|
|
5124
5138
|
if (!this.options.pedantic && this.rules.other.startAngleBracket.test(n)) {
|
|
5125
5139
|
if (!this.rules.other.endAngleBracket.test(n)) return;
|
|
5126
|
-
let s =
|
|
5140
|
+
let s = I(n.slice(0, -1), "\\");
|
|
5127
5141
|
if ((n.length - s.length) % 2 === 0) return;
|
|
5128
5142
|
} else {
|
|
5129
5143
|
let s = de(t[2], "()");
|
|
@@ -5138,7 +5152,7 @@ ${c}` : c;
|
|
|
5138
5152
|
let s = this.rules.other.pedanticHrefTitle.exec(r);
|
|
5139
5153
|
s && (r = s[1], i = s[3]);
|
|
5140
5154
|
} else i = t[3] ? t[3].slice(1, -1) : "";
|
|
5141
|
-
return r = r.trim(), this.rules.other.startAngleBracket.test(r) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(n) ? r = r.slice(1) : r = r.slice(1, -1)),
|
|
5155
|
+
return r = r.trim(), this.rules.other.startAngleBracket.test(r) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(n) ? r = r.slice(1) : r = r.slice(1, -1)), fe(t, { href: r && r.replace(this.rules.inline.anyPunctuation, "$1"), title: i && i.replace(this.rules.inline.anyPunctuation, "$1") }, t[0], this.lexer, this.rules);
|
|
5142
5156
|
}
|
|
5143
5157
|
}
|
|
5144
5158
|
reflink(e, t) {
|
|
@@ -5149,15 +5163,15 @@ ${c}` : c;
|
|
|
5149
5163
|
let s = n[0].charAt(0);
|
|
5150
5164
|
return { type: "text", raw: s, text: s };
|
|
5151
5165
|
}
|
|
5152
|
-
return
|
|
5166
|
+
return fe(n, i, n[0], this.lexer, this.rules);
|
|
5153
5167
|
}
|
|
5154
5168
|
}
|
|
5155
5169
|
emStrong(e, t, n = "") {
|
|
5156
5170
|
let r = this.rules.inline.emStrongLDelim.exec(e);
|
|
5157
|
-
if (!r || r[3] && n.match(this.rules.other.unicodeAlphaNumeric)) return;
|
|
5158
|
-
if (!(r[1] || r[
|
|
5171
|
+
if (!r || !r[1] && !r[2] && !r[3] && !r[4] || r[4] && n.match(this.rules.other.unicodeAlphaNumeric)) return;
|
|
5172
|
+
if (!(r[1] || r[3] || "") || !n || this.rules.inline.punctuation.exec(n)) {
|
|
5159
5173
|
let s = [...r[0]].length - 1, a, o, l = s, p = 0, c = r[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
|
|
5160
|
-
for (c.lastIndex = 0, t = t.slice(-1 * e.length + s); (r = c.exec(t))
|
|
5174
|
+
for (c.lastIndex = 0, t = t.slice(-1 * e.length + s); (r = c.exec(t)) !== null; ) {
|
|
5161
5175
|
if (a = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !a) continue;
|
|
5162
5176
|
if (o = [...a].length, r[3] || r[4]) {
|
|
5163
5177
|
l += o;
|
|
@@ -5168,7 +5182,7 @@ ${c}` : c;
|
|
|
5168
5182
|
}
|
|
5169
5183
|
if (l -= o, l > 0) continue;
|
|
5170
5184
|
o = Math.min(o, o + l + p);
|
|
5171
|
-
let
|
|
5185
|
+
let d = [...r[0]][0].length, h = e.slice(0, s + r.index + d + o);
|
|
5172
5186
|
if (Math.min(s, o) % 2) {
|
|
5173
5187
|
let f = h.slice(1, -1);
|
|
5174
5188
|
return { type: "em", raw: h, text: f, tokens: this.lexer.inlineTokens(f) };
|
|
@@ -5189,9 +5203,23 @@ ${c}` : c;
|
|
|
5189
5203
|
let t = this.rules.inline.br.exec(e);
|
|
5190
5204
|
if (t) return { type: "br", raw: t[0] };
|
|
5191
5205
|
}
|
|
5192
|
-
del(e) {
|
|
5193
|
-
let
|
|
5194
|
-
if (
|
|
5206
|
+
del(e, t, n = "") {
|
|
5207
|
+
let r = this.rules.inline.delLDelim.exec(e);
|
|
5208
|
+
if (!r) return;
|
|
5209
|
+
if (!(r[1] || "") || !n || this.rules.inline.punctuation.exec(n)) {
|
|
5210
|
+
let s = [...r[0]].length - 1, a, o, l = s, p = this.rules.inline.delRDelim;
|
|
5211
|
+
for (p.lastIndex = 0, t = t.slice(-1 * e.length + s); (r = p.exec(t)) !== null; ) {
|
|
5212
|
+
if (a = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !a || (o = [...a].length, o !== s)) continue;
|
|
5213
|
+
if (r[3] || r[4]) {
|
|
5214
|
+
l += o;
|
|
5215
|
+
continue;
|
|
5216
|
+
}
|
|
5217
|
+
if (l -= o, l > 0) continue;
|
|
5218
|
+
o = Math.min(o, o + l);
|
|
5219
|
+
let c = [...r[0]][0].length, d = e.slice(0, s + r.index + c + o), h = d.slice(s, -s);
|
|
5220
|
+
return { type: "del", raw: d, text: h, tokens: this.lexer.inlineTokens(h) };
|
|
5221
|
+
}
|
|
5222
|
+
}
|
|
5195
5223
|
}
|
|
5196
5224
|
autolink(e) {
|
|
5197
5225
|
let t = this.rules.inline.autolink.exec(e);
|
|
@@ -5230,12 +5258,12 @@ var x = class u {
|
|
|
5230
5258
|
__publicField(this, "state");
|
|
5231
5259
|
__publicField(this, "inlineQueue");
|
|
5232
5260
|
__publicField(this, "tokenizer");
|
|
5233
|
-
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e ||
|
|
5234
|
-
let t = { other: m, block:
|
|
5235
|
-
this.options.pedantic ? (t.block =
|
|
5261
|
+
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || O, this.options.tokenizer = this.options.tokenizer || new w(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: false, inRawBlock: false, top: true };
|
|
5262
|
+
let t = { other: m, block: B.normal, inline: E.normal };
|
|
5263
|
+
this.options.pedantic ? (t.block = B.pedantic, t.inline = E.pedantic) : this.options.gfm && (t.block = B.gfm, this.options.breaks ? t.inline = E.breaks : t.inline = E.gfm), this.tokenizer.rules = t;
|
|
5236
5264
|
}
|
|
5237
5265
|
static get rules() {
|
|
5238
|
-
return { block:
|
|
5266
|
+
return { block: B, inline: E };
|
|
5239
5267
|
}
|
|
5240
5268
|
static lex(e, t) {
|
|
5241
5269
|
return new u(t).lex(e);
|
|
@@ -5253,7 +5281,7 @@ var x = class u {
|
|
|
5253
5281
|
return this.inlineQueue = [], this.tokens;
|
|
5254
5282
|
}
|
|
5255
5283
|
blockTokens(e, t = [], n = false) {
|
|
5256
|
-
for (this.options.pedantic && (e = e.replace(m.tabCharGlobal, " ").replace(m.spaceLine, "")); e; ) {
|
|
5284
|
+
for (this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(m.tabCharGlobal, " ").replace(m.spaceLine, "")); e; ) {
|
|
5257
5285
|
let r;
|
|
5258
5286
|
if (this.options.extensions?.block?.some((s) => (r = s.call({ lexer: this }, e, t)) ? (e = e.substring(r.raw.length), t.push(r), true) : false)) continue;
|
|
5259
5287
|
if (r = this.tokenizer.space(e)) {
|
|
@@ -5351,14 +5379,15 @@ var x = class u {
|
|
|
5351
5379
|
return this.inlineQueue.push({ src: e, tokens: t }), t;
|
|
5352
5380
|
}
|
|
5353
5381
|
inlineTokens(e, t = []) {
|
|
5382
|
+
this.tokenizer.lexer = this;
|
|
5354
5383
|
let n = e, r = null;
|
|
5355
5384
|
if (this.tokens.links) {
|
|
5356
5385
|
let o = Object.keys(this.tokens.links);
|
|
5357
|
-
if (o.length > 0) for (; (r = this.tokenizer.rules.inline.reflinkSearch.exec(n))
|
|
5386
|
+
if (o.length > 0) for (; (r = this.tokenizer.rules.inline.reflinkSearch.exec(n)) !== null; ) o.includes(r[0].slice(r[0].lastIndexOf("[") + 1, -1)) && (n = n.slice(0, r.index) + "[" + "a".repeat(r[0].length - 2) + "]" + n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex));
|
|
5358
5387
|
}
|
|
5359
|
-
for (; (r = this.tokenizer.rules.inline.anyPunctuation.exec(n))
|
|
5388
|
+
for (; (r = this.tokenizer.rules.inline.anyPunctuation.exec(n)) !== null; ) n = n.slice(0, r.index) + "++" + n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
|
|
5360
5389
|
let i;
|
|
5361
|
-
for (; (r = this.tokenizer.rules.inline.blockSkip.exec(n))
|
|
5390
|
+
for (; (r = this.tokenizer.rules.inline.blockSkip.exec(n)) !== null; ) i = r[2] ? r[2].length : 0, n = n.slice(0, r.index + i) + "[" + "a".repeat(r[0].length - i - 2) + "]" + n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
|
|
5362
5391
|
n = this.options.hooks?.emStrongMask?.call({ lexer: this }, n) ?? n;
|
|
5363
5392
|
let s = false, a = "";
|
|
5364
5393
|
for (; e; ) {
|
|
@@ -5395,7 +5424,7 @@ var x = class u {
|
|
|
5395
5424
|
e = e.substring(o.raw.length), t.push(o);
|
|
5396
5425
|
continue;
|
|
5397
5426
|
}
|
|
5398
|
-
if (o = this.tokenizer.del(e)) {
|
|
5427
|
+
if (o = this.tokenizer.del(e, n, a)) {
|
|
5399
5428
|
e = e.substring(o.raw.length), t.push(o);
|
|
5400
5429
|
continue;
|
|
5401
5430
|
}
|
|
@@ -5409,9 +5438,9 @@ var x = class u {
|
|
|
5409
5438
|
}
|
|
5410
5439
|
let l = e;
|
|
5411
5440
|
if (this.options.extensions?.startInline) {
|
|
5412
|
-
let p = 1 / 0, c = e.slice(1),
|
|
5441
|
+
let p = 1 / 0, c = e.slice(1), d;
|
|
5413
5442
|
this.options.extensions.startInline.forEach((h) => {
|
|
5414
|
-
|
|
5443
|
+
d = h.call({ lexer: this }, c), typeof d == "number" && d >= 0 && (p = Math.min(p, d));
|
|
5415
5444
|
}), p < 1 / 0 && p >= 0 && (l = e.substring(0, p + 1));
|
|
5416
5445
|
}
|
|
5417
5446
|
if (o = this.tokenizer.inlineText(l)) {
|
|
@@ -5431,11 +5460,11 @@ var x = class u {
|
|
|
5431
5460
|
return t;
|
|
5432
5461
|
}
|
|
5433
5462
|
};
|
|
5434
|
-
var
|
|
5463
|
+
var y = class {
|
|
5435
5464
|
constructor(e) {
|
|
5436
5465
|
__publicField(this, "options");
|
|
5437
5466
|
__publicField(this, "parser");
|
|
5438
|
-
this.options = e ||
|
|
5467
|
+
this.options = e || O;
|
|
5439
5468
|
}
|
|
5440
5469
|
space(e) {
|
|
5441
5470
|
return "";
|
|
@@ -5443,8 +5472,8 @@ var P = class {
|
|
|
5443
5472
|
code({ text: e, lang: t, escaped: n }) {
|
|
5444
5473
|
let r = (t || "").match(m.notSpaceStart)?.[0], i = e.replace(m.endingNewline, "") + `
|
|
5445
5474
|
`;
|
|
5446
|
-
return r ? '<pre><code class="language-' +
|
|
5447
|
-
` : "<pre><code>" + (n ? i :
|
|
5475
|
+
return r ? '<pre><code class="language-' + T(r) + '">' + (n ? i : T(i, true)) + `</code></pre>
|
|
5476
|
+
` : "<pre><code>" + (n ? i : T(i, true)) + `</code></pre>
|
|
5448
5477
|
`;
|
|
5449
5478
|
}
|
|
5450
5479
|
blockquote({ tokens: e }) {
|
|
@@ -5522,7 +5551,7 @@ ${e}</tr>
|
|
|
5522
5551
|
return `<em>${this.parser.parseInline(e)}</em>`;
|
|
5523
5552
|
}
|
|
5524
5553
|
codespan({ text: e }) {
|
|
5525
|
-
return `<code>${
|
|
5554
|
+
return `<code>${T(e, true)}</code>`;
|
|
5526
5555
|
}
|
|
5527
5556
|
br(e) {
|
|
5528
5557
|
return "<br>";
|
|
@@ -5531,22 +5560,22 @@ ${e}</tr>
|
|
|
5531
5560
|
return `<del>${this.parser.parseInline(e)}</del>`;
|
|
5532
5561
|
}
|
|
5533
5562
|
link({ href: e, title: t, tokens: n }) {
|
|
5534
|
-
let r = this.parser.parseInline(n), i =
|
|
5563
|
+
let r = this.parser.parseInline(n), i = J(e);
|
|
5535
5564
|
if (i === null) return r;
|
|
5536
5565
|
e = i;
|
|
5537
5566
|
let s = '<a href="' + e + '"';
|
|
5538
|
-
return t && (s += ' title="' +
|
|
5567
|
+
return t && (s += ' title="' + T(t) + '"'), s += ">" + r + "</a>", s;
|
|
5539
5568
|
}
|
|
5540
5569
|
image({ href: e, title: t, text: n, tokens: r }) {
|
|
5541
5570
|
r && (n = this.parser.parseInline(r, this.parser.textRenderer));
|
|
5542
|
-
let i =
|
|
5543
|
-
if (i === null) return
|
|
5571
|
+
let i = J(e);
|
|
5572
|
+
if (i === null) return T(n);
|
|
5544
5573
|
e = i;
|
|
5545
|
-
let s = `<img src="${e}" alt="${n}"`;
|
|
5546
|
-
return t && (s += ` title="${
|
|
5574
|
+
let s = `<img src="${e}" alt="${T(n)}"`;
|
|
5575
|
+
return t && (s += ` title="${T(t)}"`), s += ">", s;
|
|
5547
5576
|
}
|
|
5548
5577
|
text(e) {
|
|
5549
|
-
return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text :
|
|
5578
|
+
return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text : T(e.text);
|
|
5550
5579
|
}
|
|
5551
5580
|
};
|
|
5552
5581
|
var $ = class {
|
|
@@ -5586,7 +5615,7 @@ var b = class u2 {
|
|
|
5586
5615
|
__publicField(this, "options");
|
|
5587
5616
|
__publicField(this, "renderer");
|
|
5588
5617
|
__publicField(this, "textRenderer");
|
|
5589
|
-
this.options = e ||
|
|
5618
|
+
this.options = e || O, this.options.renderer = this.options.renderer || new y(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new $();
|
|
5590
5619
|
}
|
|
5591
5620
|
static parse(e, t) {
|
|
5592
5621
|
return new u2(t).parse(e);
|
|
@@ -5595,6 +5624,7 @@ var b = class u2 {
|
|
|
5595
5624
|
return new u2(t).parseInline(e);
|
|
5596
5625
|
}
|
|
5597
5626
|
parse(e) {
|
|
5627
|
+
this.renderer.parser = this;
|
|
5598
5628
|
let t = "";
|
|
5599
5629
|
for (let n = 0; n < e.length; n++) {
|
|
5600
5630
|
let r = e[n];
|
|
@@ -5665,6 +5695,7 @@ var b = class u2 {
|
|
|
5665
5695
|
return t;
|
|
5666
5696
|
}
|
|
5667
5697
|
parseInline(e, t = this.renderer) {
|
|
5698
|
+
this.renderer.parser = this;
|
|
5668
5699
|
let n = "";
|
|
5669
5700
|
for (let r = 0; r < e.length; r++) {
|
|
5670
5701
|
let i = e[r];
|
|
@@ -5732,11 +5763,11 @@ var b = class u2 {
|
|
|
5732
5763
|
}
|
|
5733
5764
|
};
|
|
5734
5765
|
var _a;
|
|
5735
|
-
var
|
|
5766
|
+
var P = (_a = class {
|
|
5736
5767
|
constructor(e) {
|
|
5737
5768
|
__publicField(this, "options");
|
|
5738
5769
|
__publicField(this, "block");
|
|
5739
|
-
this.options = e ||
|
|
5770
|
+
this.options = e || O;
|
|
5740
5771
|
}
|
|
5741
5772
|
preprocess(e) {
|
|
5742
5773
|
return e;
|
|
@@ -5750,25 +5781,25 @@ var S = (_a = class {
|
|
|
5750
5781
|
emStrongMask(e) {
|
|
5751
5782
|
return e;
|
|
5752
5783
|
}
|
|
5753
|
-
provideLexer() {
|
|
5754
|
-
return
|
|
5784
|
+
provideLexer(e = this.block) {
|
|
5785
|
+
return e ? x.lex : x.lexInline;
|
|
5755
5786
|
}
|
|
5756
|
-
provideParser() {
|
|
5757
|
-
return
|
|
5787
|
+
provideParser(e = this.block) {
|
|
5788
|
+
return e ? b.parse : b.parseInline;
|
|
5758
5789
|
}
|
|
5759
5790
|
}, __publicField(_a, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), __publicField(_a, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), _a);
|
|
5760
|
-
var
|
|
5791
|
+
var D = class {
|
|
5761
5792
|
constructor(...e) {
|
|
5762
|
-
__publicField(this, "defaults",
|
|
5793
|
+
__publicField(this, "defaults", M());
|
|
5763
5794
|
__publicField(this, "options", this.setOptions);
|
|
5764
5795
|
__publicField(this, "parse", this.parseMarkdown(true));
|
|
5765
5796
|
__publicField(this, "parseInline", this.parseMarkdown(false));
|
|
5766
5797
|
__publicField(this, "Parser", b);
|
|
5767
|
-
__publicField(this, "Renderer",
|
|
5798
|
+
__publicField(this, "Renderer", y);
|
|
5768
5799
|
__publicField(this, "TextRenderer", $);
|
|
5769
5800
|
__publicField(this, "Lexer", x);
|
|
5770
|
-
__publicField(this, "Tokenizer",
|
|
5771
|
-
__publicField(this, "Hooks",
|
|
5801
|
+
__publicField(this, "Tokenizer", w);
|
|
5802
|
+
__publicField(this, "Hooks", P);
|
|
5772
5803
|
this.use(...e);
|
|
5773
5804
|
}
|
|
5774
5805
|
walkTokens(e, t) {
|
|
@@ -5815,7 +5846,7 @@ var B = class {
|
|
|
5815
5846
|
}
|
|
5816
5847
|
"childTokens" in i && i.childTokens && (t.childTokens[i.name] = i.childTokens);
|
|
5817
5848
|
}), r.extensions = t), n.renderer) {
|
|
5818
|
-
let i = this.defaults.renderer || new
|
|
5849
|
+
let i = this.defaults.renderer || new y(this.defaults);
|
|
5819
5850
|
for (let s in n.renderer) {
|
|
5820
5851
|
if (!(s in i)) throw new Error(`renderer '${s}' does not exist`);
|
|
5821
5852
|
if (["options", "parser"].includes(s)) continue;
|
|
@@ -5828,7 +5859,7 @@ var B = class {
|
|
|
5828
5859
|
r.renderer = i;
|
|
5829
5860
|
}
|
|
5830
5861
|
if (n.tokenizer) {
|
|
5831
|
-
let i = this.defaults.tokenizer || new
|
|
5862
|
+
let i = this.defaults.tokenizer || new w(this.defaults);
|
|
5832
5863
|
for (let s in n.tokenizer) {
|
|
5833
5864
|
if (!(s in i)) throw new Error(`tokenizer '${s}' does not exist`);
|
|
5834
5865
|
if (["options", "rules", "lexer"].includes(s)) continue;
|
|
@@ -5841,22 +5872,22 @@ var B = class {
|
|
|
5841
5872
|
r.tokenizer = i;
|
|
5842
5873
|
}
|
|
5843
5874
|
if (n.hooks) {
|
|
5844
|
-
let i = this.defaults.hooks || new
|
|
5875
|
+
let i = this.defaults.hooks || new P();
|
|
5845
5876
|
for (let s in n.hooks) {
|
|
5846
5877
|
if (!(s in i)) throw new Error(`hook '${s}' does not exist`);
|
|
5847
5878
|
if (["options", "block"].includes(s)) continue;
|
|
5848
5879
|
let a = s, o = n.hooks[a], l = i[a];
|
|
5849
|
-
|
|
5850
|
-
if (this.defaults.async &&
|
|
5851
|
-
let
|
|
5852
|
-
return l.call(i,
|
|
5880
|
+
P.passThroughHooks.has(s) ? i[a] = (p) => {
|
|
5881
|
+
if (this.defaults.async && P.passThroughHooksRespectAsync.has(s)) return (async () => {
|
|
5882
|
+
let d = await o.call(i, p);
|
|
5883
|
+
return l.call(i, d);
|
|
5853
5884
|
})();
|
|
5854
5885
|
let c = o.call(i, p);
|
|
5855
5886
|
return l.call(i, c);
|
|
5856
5887
|
} : i[a] = (...p) => {
|
|
5857
5888
|
if (this.defaults.async) return (async () => {
|
|
5858
|
-
let
|
|
5859
|
-
return
|
|
5889
|
+
let d = await o.apply(i, p);
|
|
5890
|
+
return d === false && (d = await l.apply(i, p)), d;
|
|
5860
5891
|
})();
|
|
5861
5892
|
let c = o.apply(i, p);
|
|
5862
5893
|
return c === false && (c = l.apply(i, p)), c;
|
|
@@ -5890,16 +5921,16 @@ var B = class {
|
|
|
5890
5921
|
if (typeof n > "u" || n === null) return a(new Error("marked(): input parameter is undefined or null"));
|
|
5891
5922
|
if (typeof n != "string") return a(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(n) + ", string expected"));
|
|
5892
5923
|
if (s.hooks && (s.hooks.options = s, s.hooks.block = e), s.async) return (async () => {
|
|
5893
|
-
let o = s.hooks ? await s.hooks.preprocess(n) : n, p = await (s.hooks ? await s.hooks.provideLexer() : e ? x.lex : x.lexInline)(o, s), c = s.hooks ? await s.hooks.processAllTokens(p) : p;
|
|
5924
|
+
let o = s.hooks ? await s.hooks.preprocess(n) : n, p = await (s.hooks ? await s.hooks.provideLexer(e) : e ? x.lex : x.lexInline)(o, s), c = s.hooks ? await s.hooks.processAllTokens(p) : p;
|
|
5894
5925
|
s.walkTokens && await Promise.all(this.walkTokens(c, s.walkTokens));
|
|
5895
|
-
let h = await (s.hooks ? await s.hooks.provideParser() : e ? b.parse : b.parseInline)(c, s);
|
|
5926
|
+
let h = await (s.hooks ? await s.hooks.provideParser(e) : e ? b.parse : b.parseInline)(c, s);
|
|
5896
5927
|
return s.hooks ? await s.hooks.postprocess(h) : h;
|
|
5897
5928
|
})().catch(a);
|
|
5898
5929
|
try {
|
|
5899
5930
|
s.hooks && (n = s.hooks.preprocess(n));
|
|
5900
|
-
let l = (s.hooks ? s.hooks.provideLexer() : e ? x.lex : x.lexInline)(n, s);
|
|
5931
|
+
let l = (s.hooks ? s.hooks.provideLexer(e) : e ? x.lex : x.lexInline)(n, s);
|
|
5901
5932
|
s.hooks && (l = s.hooks.processAllTokens(l)), s.walkTokens && this.walkTokens(l, s.walkTokens);
|
|
5902
|
-
let c = (s.hooks ? s.hooks.provideParser() : e ? b.parse : b.parseInline)(l, s);
|
|
5933
|
+
let c = (s.hooks ? s.hooks.provideParser(e) : e ? b.parse : b.parseInline)(l, s);
|
|
5903
5934
|
return s.hooks && (c = s.hooks.postprocess(c)), c;
|
|
5904
5935
|
} catch (o) {
|
|
5905
5936
|
return a(o);
|
|
@@ -5910,7 +5941,7 @@ var B = class {
|
|
|
5910
5941
|
return (n) => {
|
|
5911
5942
|
if (n.message += `
|
|
5912
5943
|
Please report this to https://github.com/markedjs/marked.`, e) {
|
|
5913
|
-
let r = "<p>An error occurred:</p><pre>" +
|
|
5944
|
+
let r = "<p>An error occurred:</p><pre>" + T(n.message + "", true) + "</pre>";
|
|
5914
5945
|
return t ? Promise.resolve(r) : r;
|
|
5915
5946
|
}
|
|
5916
5947
|
if (t) return Promise.reject(n);
|
|
@@ -5918,44 +5949,44 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
5918
5949
|
};
|
|
5919
5950
|
}
|
|
5920
5951
|
};
|
|
5921
|
-
var
|
|
5922
|
-
function
|
|
5923
|
-
return
|
|
5952
|
+
var L = new D();
|
|
5953
|
+
function g(u3, e) {
|
|
5954
|
+
return L.parse(u3, e);
|
|
5924
5955
|
}
|
|
5925
|
-
|
|
5926
|
-
return
|
|
5956
|
+
g.options = g.setOptions = function(u3) {
|
|
5957
|
+
return L.setOptions(u3), g.defaults = L.defaults, G(g.defaults), g;
|
|
5927
5958
|
};
|
|
5928
|
-
|
|
5929
|
-
|
|
5930
|
-
|
|
5931
|
-
return
|
|
5959
|
+
g.getDefaults = M;
|
|
5960
|
+
g.defaults = O;
|
|
5961
|
+
g.use = function(...u3) {
|
|
5962
|
+
return L.use(...u3), g.defaults = L.defaults, G(g.defaults), g;
|
|
5932
5963
|
};
|
|
5933
|
-
|
|
5934
|
-
return
|
|
5964
|
+
g.walkTokens = function(u3, e) {
|
|
5965
|
+
return L.walkTokens(u3, e);
|
|
5935
5966
|
};
|
|
5936
|
-
|
|
5937
|
-
|
|
5938
|
-
|
|
5939
|
-
|
|
5940
|
-
|
|
5941
|
-
|
|
5942
|
-
|
|
5943
|
-
|
|
5944
|
-
|
|
5945
|
-
|
|
5946
|
-
|
|
5947
|
-
|
|
5948
|
-
|
|
5949
|
-
|
|
5950
|
-
|
|
5967
|
+
g.parseInline = L.parseInline;
|
|
5968
|
+
g.Parser = b;
|
|
5969
|
+
g.parser = b.parse;
|
|
5970
|
+
g.Renderer = y;
|
|
5971
|
+
g.TextRenderer = $;
|
|
5972
|
+
g.Lexer = x;
|
|
5973
|
+
g.lexer = x.lex;
|
|
5974
|
+
g.Tokenizer = w;
|
|
5975
|
+
g.Hooks = P;
|
|
5976
|
+
g.parse = g;
|
|
5977
|
+
g.options;
|
|
5978
|
+
g.setOptions;
|
|
5979
|
+
g.use;
|
|
5980
|
+
g.walkTokens;
|
|
5981
|
+
g.parseInline;
|
|
5951
5982
|
b.parse;
|
|
5952
5983
|
x.lex;
|
|
5953
5984
|
|
|
5954
|
-
// node_modules
|
|
5985
|
+
// ../../node_modules/highlight.js/es/core.js
|
|
5955
5986
|
var import_core = __toESM(require_core());
|
|
5956
5987
|
var core_default = import_core.default;
|
|
5957
5988
|
|
|
5958
|
-
// node_modules
|
|
5989
|
+
// ../../node_modules/highlight.js/es/languages/javascript.js
|
|
5959
5990
|
var IDENT_RE = "[A-Za-z$_][0-9A-Za-z$_]*";
|
|
5960
5991
|
var KEYWORDS = [
|
|
5961
5992
|
"as",
|
|
@@ -6656,7 +6687,7 @@ function javascript(hljs) {
|
|
|
6656
6687
|
};
|
|
6657
6688
|
}
|
|
6658
6689
|
|
|
6659
|
-
// node_modules
|
|
6690
|
+
// ../../node_modules/highlight.js/es/languages/typescript.js
|
|
6660
6691
|
var IDENT_RE2 = "[A-Za-z$_][0-9A-Za-z$_]*";
|
|
6661
6692
|
var KEYWORDS2 = [
|
|
6662
6693
|
"as",
|
|
@@ -7470,7 +7501,7 @@ function typescript(hljs) {
|
|
|
7470
7501
|
return tsLanguage;
|
|
7471
7502
|
}
|
|
7472
7503
|
|
|
7473
|
-
// node_modules
|
|
7504
|
+
// ../../node_modules/highlight.js/es/languages/python.js
|
|
7474
7505
|
function python(hljs) {
|
|
7475
7506
|
const regex = hljs.regex;
|
|
7476
7507
|
const IDENT_RE3 = /[\p{XID_Start}_]\p{XID_Continue}*/u;
|
|
@@ -7885,7 +7916,7 @@ function python(hljs) {
|
|
|
7885
7916
|
};
|
|
7886
7917
|
}
|
|
7887
7918
|
|
|
7888
|
-
// node_modules
|
|
7919
|
+
// ../../node_modules/highlight.js/es/languages/json.js
|
|
7889
7920
|
function json(hljs) {
|
|
7890
7921
|
const ATTRIBUTE = {
|
|
7891
7922
|
className: "attr",
|
|
@@ -7925,7 +7956,7 @@ function json(hljs) {
|
|
|
7925
7956
|
};
|
|
7926
7957
|
}
|
|
7927
7958
|
|
|
7928
|
-
// node_modules
|
|
7959
|
+
// ../../node_modules/highlight.js/es/languages/bash.js
|
|
7929
7960
|
function bash(hljs) {
|
|
7930
7961
|
const regex = hljs.regex;
|
|
7931
7962
|
const VAR = {};
|
|
@@ -8319,7 +8350,7 @@ function bash(hljs) {
|
|
|
8319
8350
|
};
|
|
8320
8351
|
}
|
|
8321
8352
|
|
|
8322
|
-
// node_modules
|
|
8353
|
+
// ../../node_modules/highlight.js/es/languages/shell.js
|
|
8323
8354
|
function shell(hljs) {
|
|
8324
8355
|
return {
|
|
8325
8356
|
name: "Shell Session",
|
|
@@ -8343,7 +8374,7 @@ function shell(hljs) {
|
|
|
8343
8374
|
};
|
|
8344
8375
|
}
|
|
8345
8376
|
|
|
8346
|
-
// node_modules
|
|
8377
|
+
// ../../node_modules/highlight.js/es/languages/css.js
|
|
8347
8378
|
var MODES = (hljs) => {
|
|
8348
8379
|
return {
|
|
8349
8380
|
IMPORTANT: {
|
|
@@ -9280,7 +9311,7 @@ function css(hljs) {
|
|
|
9280
9311
|
};
|
|
9281
9312
|
}
|
|
9282
9313
|
|
|
9283
|
-
// node_modules
|
|
9314
|
+
// ../../node_modules/highlight.js/es/languages/xml.js
|
|
9284
9315
|
function xml(hljs) {
|
|
9285
9316
|
const regex = hljs.regex;
|
|
9286
9317
|
const TAG_NAME_RE = regex.concat(/[\p{L}_]/u, regex.optional(/[\p{L}0-9_.-]*:/u), /[\p{L}0-9_.-]*/u);
|
|
@@ -9506,7 +9537,7 @@ function xml(hljs) {
|
|
|
9506
9537
|
};
|
|
9507
9538
|
}
|
|
9508
9539
|
|
|
9509
|
-
// node_modules
|
|
9540
|
+
// ../../node_modules/highlight.js/es/languages/markdown.js
|
|
9510
9541
|
function markdown(hljs) {
|
|
9511
9542
|
const regex = hljs.regex;
|
|
9512
9543
|
const INLINE_HTML = {
|
|
@@ -9738,7 +9769,7 @@ function markdown(hljs) {
|
|
|
9738
9769
|
};
|
|
9739
9770
|
}
|
|
9740
9771
|
|
|
9741
|
-
// node_modules
|
|
9772
|
+
// ../../node_modules/highlight.js/es/languages/sql.js
|
|
9742
9773
|
function sql(hljs) {
|
|
9743
9774
|
const regex = hljs.regex;
|
|
9744
9775
|
const COMMENT_MODE = hljs.COMMENT("--", "$");
|
|
@@ -10381,7 +10412,7 @@ function sql(hljs) {
|
|
|
10381
10412
|
};
|
|
10382
10413
|
}
|
|
10383
10414
|
|
|
10384
|
-
// node_modules
|
|
10415
|
+
// ../../node_modules/highlight.js/es/languages/yaml.js
|
|
10385
10416
|
function yaml(hljs) {
|
|
10386
10417
|
const LITERALS3 = "true false yes no null";
|
|
10387
10418
|
const URI_CHARACTERS = "[\\w#;/?:@&=+$,.~*'()[\\]]+";
|
|
@@ -10582,7 +10613,7 @@ function yaml(hljs) {
|
|
|
10582
10613
|
};
|
|
10583
10614
|
}
|
|
10584
10615
|
|
|
10585
|
-
// node_modules
|
|
10616
|
+
// ../../node_modules/highlight.js/es/languages/rust.js
|
|
10586
10617
|
function rust(hljs) {
|
|
10587
10618
|
const regex = hljs.regex;
|
|
10588
10619
|
const RAW_IDENTIFIER = /(r#)?/;
|
|
@@ -10895,7 +10926,7 @@ function rust(hljs) {
|
|
|
10895
10926
|
};
|
|
10896
10927
|
}
|
|
10897
10928
|
|
|
10898
|
-
// node_modules
|
|
10929
|
+
// ../../node_modules/highlight.js/es/languages/go.js
|
|
10899
10930
|
function go(hljs) {
|
|
10900
10931
|
const LITERALS3 = [
|
|
10901
10932
|
"true",
|
|
@@ -11049,7 +11080,7 @@ function go(hljs) {
|
|
|
11049
11080
|
};
|
|
11050
11081
|
}
|
|
11051
11082
|
|
|
11052
|
-
// node_modules
|
|
11083
|
+
// ../../node_modules/highlight.js/es/languages/java.js
|
|
11053
11084
|
var decimalDigits = "[0-9](_*[0-9])*";
|
|
11054
11085
|
var frac = `\\.(${decimalDigits})`;
|
|
11055
11086
|
var hexDigits = "[0-9a-fA-F](_*[0-9a-fA-F])*";
|
|
@@ -11303,7 +11334,7 @@ function java(hljs) {
|
|
|
11303
11334
|
};
|
|
11304
11335
|
}
|
|
11305
11336
|
|
|
11306
|
-
// node_modules
|
|
11337
|
+
// ../../node_modules/highlight.js/es/languages/cpp.js
|
|
11307
11338
|
function cpp(hljs) {
|
|
11308
11339
|
const regex = hljs.regex;
|
|
11309
11340
|
const C_LINE_COMMENT_MODE = hljs.COMMENT("//", "$", { contains: [{ begin: /\\\n/ }] });
|
|
@@ -11846,7 +11877,7 @@ function cpp(hljs) {
|
|
|
11846
11877
|
};
|
|
11847
11878
|
}
|
|
11848
11879
|
|
|
11849
|
-
// node_modules
|
|
11880
|
+
// ../../node_modules/highlight.js/es/languages/csharp.js
|
|
11850
11881
|
function csharp(hljs) {
|
|
11851
11882
|
const BUILT_IN_KEYWORDS = [
|
|
11852
11883
|
"bool",
|
|
@@ -12246,7 +12277,7 @@ function csharp(hljs) {
|
|
|
12246
12277
|
};
|
|
12247
12278
|
}
|
|
12248
12279
|
|
|
12249
|
-
// node_modules
|
|
12280
|
+
// ../../node_modules/highlight.js/es/languages/php.js
|
|
12250
12281
|
function php(hljs) {
|
|
12251
12282
|
const regex = hljs.regex;
|
|
12252
12283
|
const NOT_PERL_ETC = /(?![A-Za-z0-9])(?![$])/;
|
|
@@ -12847,7 +12878,7 @@ function php(hljs) {
|
|
|
12847
12878
|
};
|
|
12848
12879
|
}
|
|
12849
12880
|
|
|
12850
|
-
// node_modules
|
|
12881
|
+
// ../../node_modules/highlight.js/es/languages/ruby.js
|
|
12851
12882
|
function ruby(hljs) {
|
|
12852
12883
|
const regex = hljs.regex;
|
|
12853
12884
|
const RUBY_METHOD_RE = "([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)";
|
|
@@ -13260,7 +13291,7 @@ function ruby(hljs) {
|
|
|
13260
13291
|
};
|
|
13261
13292
|
}
|
|
13262
13293
|
|
|
13263
|
-
// node_modules
|
|
13294
|
+
// ../../node_modules/highlight.js/es/languages/swift.js
|
|
13264
13295
|
function source(re2) {
|
|
13265
13296
|
if (!re2) return null;
|
|
13266
13297
|
if (typeof re2 === "string") return re2;
|
|
@@ -14135,7 +14166,7 @@ function swift(hljs) {
|
|
|
14135
14166
|
};
|
|
14136
14167
|
}
|
|
14137
14168
|
|
|
14138
|
-
// node_modules
|
|
14169
|
+
// ../../node_modules/highlight.js/es/languages/kotlin.js
|
|
14139
14170
|
var decimalDigits2 = "[0-9](_*[0-9])*";
|
|
14140
14171
|
var frac2 = `\\.(${decimalDigits2})`;
|
|
14141
14172
|
var hexDigits2 = "[0-9a-fA-F](_*[0-9a-fA-F])*";
|
|
@@ -14605,7 +14636,7 @@ var scopedStyles = `
|
|
|
14605
14636
|
font-style: italic;
|
|
14606
14637
|
}
|
|
14607
14638
|
`;
|
|
14608
|
-
|
|
14639
|
+
g.use({
|
|
14609
14640
|
gfm: true,
|
|
14610
14641
|
breaks: false
|
|
14611
14642
|
});
|
|
@@ -14627,7 +14658,7 @@ function generateCodeBlockId() {
|
|
|
14627
14658
|
return `code-block-${++codeBlockCounter}`;
|
|
14628
14659
|
}
|
|
14629
14660
|
function renderMarkdown(content) {
|
|
14630
|
-
const html =
|
|
14661
|
+
const html = g.parse(content, { async: false });
|
|
14631
14662
|
const codeBlockRegex = /<pre><code class="language-(\w+)">([\s\S]*?)<\/code><\/pre>/g;
|
|
14632
14663
|
let result = html.replace(codeBlockRegex, (_2, lang, code2) => {
|
|
14633
14664
|
const decoded = code2.replace(/</g, "<").replace(/>/g, ">").replace(/&/g, "&").replace(/"/g, '"');
|