@mxmweb/rtext 1.6.14 → 1.6.16

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.
@@ -1,137 +0,0 @@
1
- Prism.languages.javascript = Prism.languages.extend("clike", {
2
- "class-name": [
3
- Prism.languages.clike["class-name"],
4
- {
5
- pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,
6
- lookbehind: !0
7
- }
8
- ],
9
- keyword: [
10
- {
11
- pattern: /((?:^|\})\s*)catch\b/,
12
- lookbehind: !0
13
- },
14
- {
15
- pattern: /(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,
16
- lookbehind: !0
17
- }
18
- ],
19
- // Allow for all non-ASCII characters (See http://stackoverflow.com/a/2008444)
20
- function: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,
21
- number: {
22
- pattern: RegExp(
23
- /(^|[^\w$])/.source + "(?:" + // constant
24
- (/NaN|Infinity/.source + "|" + // binary integer
25
- /0[bB][01]+(?:_[01]+)*n?/.source + "|" + // octal integer
26
- /0[oO][0-7]+(?:_[0-7]+)*n?/.source + "|" + // hexadecimal integer
27
- /0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source + "|" + // decimal bigint
28
- /\d+(?:_\d+)*n/.source + "|" + // decimal number (integer or float) but no bigint
29
- /(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source) + ")" + /(?![\w$])/.source
30
- ),
31
- lookbehind: !0
32
- },
33
- operator: /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/
34
- });
35
- Prism.languages.javascript["class-name"][0].pattern = /(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/;
36
- Prism.languages.insertBefore("javascript", "keyword", {
37
- regex: {
38
- pattern: RegExp(
39
- // lookbehind
40
- // eslint-disable-next-line regexp/no-dupe-characters-character-class
41
- /((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source + // Regex pattern:
42
- // There are 2 regex patterns here. The RegExp set notation proposal added support for nested character
43
- // classes if the `v` flag is present. Unfortunately, nested CCs are both context-free and incompatible
44
- // with the only syntax, so we have to define 2 different regex patterns.
45
- /\//.source + "(?:" + /(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source + "|" + // `v` flag syntax. This supports 3 levels of nested character classes.
46
- /(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source + ")" + // lookahead
47
- /(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source
48
- ),
49
- lookbehind: !0,
50
- greedy: !0,
51
- inside: {
52
- "regex-source": {
53
- pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/,
54
- lookbehind: !0,
55
- alias: "language-regex",
56
- inside: Prism.languages.regex
57
- },
58
- "regex-delimiter": /^\/|\/$/,
59
- "regex-flags": /^[a-z]+$/
60
- }
61
- },
62
- // This must be declared before keyword because we use "function" inside the look-forward
63
- "function-variable": {
64
- pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,
65
- alias: "function"
66
- },
67
- parameter: [
68
- {
69
- pattern: /(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,
70
- lookbehind: !0,
71
- inside: Prism.languages.javascript
72
- },
73
- {
74
- pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,
75
- lookbehind: !0,
76
- inside: Prism.languages.javascript
77
- },
78
- {
79
- pattern: /(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,
80
- lookbehind: !0,
81
- inside: Prism.languages.javascript
82
- },
83
- {
84
- pattern: /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,
85
- lookbehind: !0,
86
- inside: Prism.languages.javascript
87
- }
88
- ],
89
- constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/
90
- });
91
- Prism.languages.insertBefore("javascript", "string", {
92
- hashbang: {
93
- pattern: /^#!.*/,
94
- greedy: !0,
95
- alias: "comment"
96
- },
97
- "template-string": {
98
- pattern: /`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,
99
- greedy: !0,
100
- inside: {
101
- "template-punctuation": {
102
- pattern: /^`|`$/,
103
- alias: "string"
104
- },
105
- interpolation: {
106
- pattern: /((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,
107
- lookbehind: !0,
108
- inside: {
109
- "interpolation-punctuation": {
110
- pattern: /^\$\{|\}$/,
111
- alias: "punctuation"
112
- },
113
- rest: Prism.languages.javascript
114
- }
115
- },
116
- string: /[\s\S]+/
117
- }
118
- },
119
- "string-property": {
120
- pattern: /((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,
121
- lookbehind: !0,
122
- greedy: !0,
123
- alias: "property"
124
- }
125
- });
126
- Prism.languages.insertBefore("javascript", "operator", {
127
- "literal-property": {
128
- pattern: /((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,
129
- lookbehind: !0,
130
- alias: "property"
131
- }
132
- });
133
- Prism.languages.markup && (Prism.languages.markup.tag.addInlined("script", "javascript"), Prism.languages.markup.tag.addAttribute(
134
- /on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,
135
- "javascript"
136
- ));
137
- Prism.languages.js = Prism.languages.javascript;
@@ -1,25 +0,0 @@
1
- Prism.languages.json = {
2
- property: {
3
- pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,
4
- lookbehind: !0,
5
- greedy: !0
6
- },
7
- string: {
8
- pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,
9
- lookbehind: !0,
10
- greedy: !0
11
- },
12
- comment: {
13
- pattern: /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,
14
- greedy: !0
15
- },
16
- number: /-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,
17
- punctuation: /[{}[\],]/,
18
- operator: /:/,
19
- boolean: /\b(?:false|true)\b/,
20
- null: {
21
- pattern: /\bnull\b/,
22
- alias: "keyword"
23
- }
24
- };
25
- Prism.languages.webmanifest = Prism.languages.json;
@@ -1,51 +0,0 @@
1
- (function(a) {
2
- var l = a.util.clone(a.languages.javascript), f = /(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source, o = /(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source, u = /(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;
3
- function c(e, t) {
4
- return e = e.replace(/<S>/g, function() {
5
- return f;
6
- }).replace(/<BRACES>/g, function() {
7
- return o;
8
- }).replace(/<SPREAD>/g, function() {
9
- return u;
10
- }), RegExp(e, t);
11
- }
12
- u = c(u).source, a.languages.jsx = a.languages.extend("markup", l), a.languages.jsx.tag.pattern = c(
13
- /<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source
14
- ), a.languages.jsx.tag.inside.tag.pattern = /^<\/?[^\s>\/]*/, a.languages.jsx.tag.inside["attr-value"].pattern = /=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/, a.languages.jsx.tag.inside.tag.inside["class-name"] = /^[A-Z]\w*(?:\.[A-Z]\w*)*$/, a.languages.jsx.tag.inside.comment = l.comment, a.languages.insertBefore("inside", "attr-name", {
15
- spread: {
16
- pattern: c(/<SPREAD>/.source),
17
- inside: a.languages.jsx
18
- }
19
- }, a.languages.jsx.tag), a.languages.insertBefore("inside", "special-attr", {
20
- script: {
21
- // Allow for two levels of nesting
22
- pattern: c(/=<BRACES>/.source),
23
- alias: "language-javascript",
24
- inside: {
25
- "script-punctuation": {
26
- pattern: /^=(?=\{)/,
27
- alias: "punctuation"
28
- },
29
- rest: a.languages.jsx
30
- }
31
- }
32
- }, a.languages.jsx.tag);
33
- var s = function(e) {
34
- return e ? typeof e == "string" ? e : typeof e.content == "string" ? e.content : e.content.map(s).join("") : "";
35
- }, p = function(e) {
36
- for (var t = [], g = 0; g < e.length; g++) {
37
- var n = e[g], i = !1;
38
- if (typeof n != "string" && (n.type === "tag" && n.content[0] && n.content[0].type === "tag" ? n.content[0].content[0].content === "</" ? t.length > 0 && t[t.length - 1].tagName === s(n.content[0].content[1]) && t.pop() : n.content[n.content.length - 1].content === "/>" || t.push({
39
- tagName: s(n.content[0].content[1]),
40
- openedBraces: 0
41
- }) : t.length > 0 && n.type === "punctuation" && n.content === "{" ? t[t.length - 1].openedBraces++ : t.length > 0 && t[t.length - 1].openedBraces > 0 && n.type === "punctuation" && n.content === "}" ? t[t.length - 1].openedBraces-- : i = !0), (i || typeof n == "string") && t.length > 0 && t[t.length - 1].openedBraces === 0) {
42
- var r = s(n);
43
- g < e.length - 1 && (typeof e[g + 1] == "string" || e[g + 1].type === "plain-text") && (r += s(e[g + 1]), e.splice(g + 1, 1)), g > 0 && (typeof e[g - 1] == "string" || e[g - 1].type === "plain-text") && (r = s(e[g - 1]) + r, e.splice(g - 1, 1), g--), e[g] = new a.Token("plain-text", r, null, r);
44
- }
45
- n.content && typeof n.content != "string" && p(n.content);
46
- }
47
- };
48
- a.hooks.add("after-tokenize", function(e) {
49
- e.language !== "jsx" && e.language !== "tsx" || p(e.tokens);
50
- });
51
- })(Prism);
@@ -1,75 +0,0 @@
1
- (function(e) {
2
- e.languages.kotlin = e.languages.extend("clike", {
3
- keyword: {
4
- // The lookbehind prevents wrong highlighting of e.g. kotlin.properties.get
5
- pattern: /(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,
6
- lookbehind: !0
7
- },
8
- function: [
9
- {
10
- pattern: /(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,
11
- greedy: !0
12
- },
13
- {
14
- pattern: /(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,
15
- lookbehind: !0,
16
- greedy: !0
17
- }
18
- ],
19
- number: /\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,
20
- operator: /\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/
21
- }), delete e.languages.kotlin["class-name"];
22
- var n = {
23
- "interpolation-punctuation": {
24
- pattern: /^\$\{?|\}$/,
25
- alias: "punctuation"
26
- },
27
- expression: {
28
- pattern: /[\s\S]+/,
29
- inside: e.languages.kotlin
30
- }
31
- };
32
- e.languages.insertBefore("kotlin", "string", {
33
- // https://kotlinlang.org/spec/expressions.html#string-interpolation-expressions
34
- "string-literal": [
35
- {
36
- pattern: /"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,
37
- alias: "multiline",
38
- inside: {
39
- interpolation: {
40
- pattern: /\$(?:[a-z_]\w*|\{[^{}]*\})/i,
41
- inside: n
42
- },
43
- string: /[\s\S]+/
44
- }
45
- },
46
- {
47
- pattern: /"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,
48
- alias: "singleline",
49
- inside: {
50
- interpolation: {
51
- pattern: /((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,
52
- lookbehind: !0,
53
- inside: n
54
- },
55
- string: /[\s\S]+/
56
- }
57
- }
58
- ],
59
- char: {
60
- // https://kotlinlang.org/spec/expressions.html#character-literals
61
- pattern: /'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,
62
- greedy: !0
63
- }
64
- }), delete e.languages.kotlin.string, e.languages.insertBefore("kotlin", "keyword", {
65
- annotation: {
66
- pattern: /\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,
67
- alias: "builtin"
68
- }
69
- }), e.languages.insertBefore("kotlin", "function", {
70
- label: {
71
- pattern: /\b\w+@|@\w+\b/,
72
- alias: "symbol"
73
- }
74
- }), e.languages.kt = e.languages.kotlin, e.languages.kts = e.languages.kotlin;
75
- })(Prism);
@@ -1,300 +0,0 @@
1
- (function(e) {
2
- var f = /(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;
3
- function d(n) {
4
- return n = n.replace(/<inner>/g, function() {
5
- return f;
6
- }), RegExp(/((?:^|[^\\])(?:\\{2})*)/.source + "(?:" + n + ")");
7
- }
8
- var g = /(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source, p = /\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g, function() {
9
- return g;
10
- }), c = /\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;
11
- e.languages.markdown = e.languages.extend("markup", {}), e.languages.insertBefore("markdown", "prolog", {
12
- "front-matter-block": {
13
- pattern: /(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,
14
- lookbehind: !0,
15
- greedy: !0,
16
- inside: {
17
- punctuation: /^---|---$/,
18
- "front-matter": {
19
- pattern: /\S+(?:\s+\S+)*/,
20
- alias: ["yaml", "language-yaml"],
21
- inside: e.languages.yaml
22
- }
23
- }
24
- },
25
- blockquote: {
26
- // > ...
27
- pattern: /^>(?:[\t ]*>)*/m,
28
- alias: "punctuation"
29
- },
30
- table: {
31
- pattern: RegExp("^" + p + c + "(?:" + p + ")*", "m"),
32
- inside: {
33
- "table-data-rows": {
34
- pattern: RegExp("^(" + p + c + ")(?:" + p + ")*$"),
35
- lookbehind: !0,
36
- inside: {
37
- "table-data": {
38
- pattern: RegExp(g),
39
- inside: e.languages.markdown
40
- },
41
- punctuation: /\|/
42
- }
43
- },
44
- "table-line": {
45
- pattern: RegExp("^(" + p + ")" + c + "$"),
46
- lookbehind: !0,
47
- inside: {
48
- punctuation: /\||:?-{3,}:?/
49
- }
50
- },
51
- "table-header-row": {
52
- pattern: RegExp("^" + p + "$"),
53
- inside: {
54
- "table-header": {
55
- pattern: RegExp(g),
56
- alias: "important",
57
- inside: e.languages.markdown
58
- },
59
- punctuation: /\|/
60
- }
61
- }
62
- }
63
- },
64
- code: [
65
- {
66
- // Prefixed by 4 spaces or 1 tab and preceded by an empty line
67
- pattern: /((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,
68
- lookbehind: !0,
69
- alias: "keyword"
70
- },
71
- {
72
- // ```optional language
73
- // code block
74
- // ```
75
- pattern: /^```[\s\S]*?^```$/m,
76
- greedy: !0,
77
- inside: {
78
- "code-block": {
79
- pattern: /^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,
80
- lookbehind: !0
81
- },
82
- "code-language": {
83
- pattern: /^(```).+/,
84
- lookbehind: !0
85
- },
86
- punctuation: /```/
87
- }
88
- }
89
- ],
90
- title: [
91
- {
92
- // title 1
93
- // =======
94
- // title 2
95
- // -------
96
- pattern: /\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,
97
- alias: "important",
98
- inside: {
99
- punctuation: /==+$|--+$/
100
- }
101
- },
102
- {
103
- // # title 1
104
- // ###### title 6
105
- pattern: /(^\s*)#.+/m,
106
- lookbehind: !0,
107
- alias: "important",
108
- inside: {
109
- punctuation: /^#+|#+$/
110
- }
111
- }
112
- ],
113
- hr: {
114
- // ***
115
- // ---
116
- // * * *
117
- // -----------
118
- pattern: /(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,
119
- lookbehind: !0,
120
- alias: "punctuation"
121
- },
122
- list: {
123
- // * item
124
- // + item
125
- // - item
126
- // 1. item
127
- pattern: /(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,
128
- lookbehind: !0,
129
- alias: "punctuation"
130
- },
131
- "url-reference": {
132
- // [id]: http://example.com "Optional title"
133
- // [id]: http://example.com 'Optional title'
134
- // [id]: http://example.com (Optional title)
135
- // [id]: <http://example.com> "Optional title"
136
- pattern: /!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,
137
- inside: {
138
- variable: {
139
- pattern: /^(!?\[)[^\]]+/,
140
- lookbehind: !0
141
- },
142
- string: /(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,
143
- punctuation: /^[\[\]!:]|[<>]/
144
- },
145
- alias: "url"
146
- },
147
- bold: {
148
- // **strong**
149
- // __strong__
150
- // allow one nested instance of italic text using the same delimiter
151
- pattern: d(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),
152
- lookbehind: !0,
153
- greedy: !0,
154
- inside: {
155
- content: {
156
- pattern: /(^..)[\s\S]+(?=..$)/,
157
- lookbehind: !0,
158
- inside: {}
159
- // see below
160
- },
161
- punctuation: /\*\*|__/
162
- }
163
- },
164
- italic: {
165
- // *em*
166
- // _em_
167
- // allow one nested instance of bold text using the same delimiter
168
- pattern: d(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),
169
- lookbehind: !0,
170
- greedy: !0,
171
- inside: {
172
- content: {
173
- pattern: /(^.)[\s\S]+(?=.$)/,
174
- lookbehind: !0,
175
- inside: {}
176
- // see below
177
- },
178
- punctuation: /[*_]/
179
- }
180
- },
181
- strike: {
182
- // ~~strike through~~
183
- // ~strike~
184
- // eslint-disable-next-line regexp/strict
185
- pattern: d(/(~~?)(?:(?!~)<inner>)+\2/.source),
186
- lookbehind: !0,
187
- greedy: !0,
188
- inside: {
189
- content: {
190
- pattern: /(^~~?)[\s\S]+(?=\1$)/,
191
- lookbehind: !0,
192
- inside: {}
193
- // see below
194
- },
195
- punctuation: /~~?/
196
- }
197
- },
198
- "code-snippet": {
199
- // `code`
200
- // ``code``
201
- pattern: /(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,
202
- lookbehind: !0,
203
- greedy: !0,
204
- alias: ["code", "keyword"]
205
- },
206
- url: {
207
- // [example](http://example.com "Optional title")
208
- // [example][id]
209
- // [example] [id]
210
- pattern: d(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),
211
- lookbehind: !0,
212
- greedy: !0,
213
- inside: {
214
- operator: /^!/,
215
- content: {
216
- pattern: /(^\[)[^\]]+(?=\])/,
217
- lookbehind: !0,
218
- inside: {}
219
- // see below
220
- },
221
- variable: {
222
- pattern: /(^\][ \t]?\[)[^\]]+(?=\]$)/,
223
- lookbehind: !0
224
- },
225
- url: {
226
- pattern: /(^\]\()[^\s)]+/,
227
- lookbehind: !0
228
- },
229
- string: {
230
- pattern: /(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,
231
- lookbehind: !0
232
- }
233
- }
234
- }
235
- }), ["url", "bold", "italic", "strike"].forEach(function(n) {
236
- ["url", "bold", "italic", "strike", "code-snippet"].forEach(function(t) {
237
- n !== t && (e.languages.markdown[n].inside.content.inside[t] = e.languages.markdown[t]);
238
- });
239
- }), e.hooks.add("after-tokenize", function(n) {
240
- if (n.language !== "markdown" && n.language !== "md")
241
- return;
242
- function t(i) {
243
- if (!(!i || typeof i == "string"))
244
- for (var r = 0, u = i.length; r < u; r++) {
245
- var o = i[r];
246
- if (o.type !== "code") {
247
- t(o.content);
248
- continue;
249
- }
250
- var l = o.content[1], a = o.content[3];
251
- if (l && a && l.type === "code-language" && a.type === "code-block" && typeof l.content == "string") {
252
- var s = l.content.replace(/\b#/g, "sharp").replace(/\b\+\+/g, "pp");
253
- s = (/[a-z][\w-]*/i.exec(s) || [""])[0].toLowerCase();
254
- var b = "language-" + s;
255
- a.alias ? typeof a.alias == "string" ? a.alias = [a.alias, b] : a.alias.push(b) : a.alias = [b];
256
- }
257
- }
258
- }
259
- t(n.tokens);
260
- }), e.hooks.add("wrap", function(n) {
261
- if (n.type === "code-block") {
262
- for (var t = "", i = 0, r = n.classes.length; i < r; i++) {
263
- var u = n.classes[i], o = /language-(.+)/.exec(u);
264
- if (o) {
265
- t = o[1];
266
- break;
267
- }
268
- }
269
- var l = e.languages[t];
270
- if (l)
271
- n.content = e.highlight(m(n.content), l, t);
272
- else if (t && t !== "none" && e.plugins.autoloader) {
273
- var a = "md-" + (/* @__PURE__ */ new Date()).valueOf() + "-" + Math.floor(Math.random() * 1e16);
274
- n.attributes.id = a, e.plugins.autoloader.loadLanguages(t, function() {
275
- var s = document.getElementById(a);
276
- s && (s.innerHTML = e.highlight(s.textContent, e.languages[t], t));
277
- });
278
- }
279
- }
280
- });
281
- var h = RegExp(e.languages.markup.tag.pattern.source, "gi"), k = {
282
- amp: "&",
283
- lt: "<",
284
- gt: ">",
285
- quot: '"'
286
- }, _ = String.fromCodePoint || String.fromCharCode;
287
- function m(n) {
288
- var t = n.replace(h, "");
289
- return t = t.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi, function(i, r) {
290
- if (r = r.toLowerCase(), r[0] === "#") {
291
- var u;
292
- return r[1] === "x" ? u = parseInt(r.slice(2), 16) : u = Number(r.slice(1)), _(u);
293
- } else {
294
- var o = k[r];
295
- return o || i;
296
- }
297
- }), t;
298
- }
299
- e.languages.md = e.languages.markdown;
300
- })(Prism);