@uiw/react-md-editor 3.17.1 → 3.18.1
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 +19 -1
- package/dist/mdeditor.css +8 -2
- package/dist/mdeditor.js +876 -47
- package/dist/mdeditor.min.css +1 -1
- package/dist/mdeditor.min.js +1 -1
- package/esm/Context.d.ts +1 -0
- package/esm/Editor.d.ts +6 -5
- package/esm/Editor.js +38 -19
- package/esm/Editor.js.map +9 -4
- package/esm/components/Toolbar/index.css +5 -1
- package/esm/components/Toolbar/index.less +5 -1
- package/lib/Context.d.ts +1 -0
- package/lib/Editor.d.ts +6 -5
- package/lib/Editor.js +45 -22
- package/lib/Editor.js.map +10 -5
- package/lib/components/Toolbar/index.less +5 -1
- package/markdown-editor.css +5 -1
- package/package.json +1 -1
- package/src/Editor.tsx +32 -34
- package/src/components/Toolbar/index.less +5 -1
package/dist/mdeditor.js
CHANGED
|
@@ -20094,11 +20094,11 @@ function color(d) {
|
|
|
20094
20094
|
* @typedef {import('unist').Node} Node
|
|
20095
20095
|
* @typedef {import('unist').Parent} Parent
|
|
20096
20096
|
* @typedef {import('unist-util-is').Test} Test
|
|
20097
|
-
* @typedef {import('./complex-types').Action} Action
|
|
20098
|
-
* @typedef {import('./complex-types').Index} Index
|
|
20099
|
-
* @typedef {import('./complex-types').ActionTuple} ActionTuple
|
|
20100
|
-
* @typedef {import('./complex-types').VisitorResult} VisitorResult
|
|
20101
|
-
* @typedef {import('./complex-types').Visitor} Visitor
|
|
20097
|
+
* @typedef {import('./complex-types.js').Action} Action
|
|
20098
|
+
* @typedef {import('./complex-types.js').Index} Index
|
|
20099
|
+
* @typedef {import('./complex-types.js').ActionTuple} ActionTuple
|
|
20100
|
+
* @typedef {import('./complex-types.js').VisitorResult} VisitorResult
|
|
20101
|
+
* @typedef {import('./complex-types.js').Visitor} Visitor
|
|
20102
20102
|
*/
|
|
20103
20103
|
|
|
20104
20104
|
|
|
@@ -20118,26 +20118,30 @@ const SKIP = 'skip'
|
|
|
20118
20118
|
const EXIT = false
|
|
20119
20119
|
|
|
20120
20120
|
/**
|
|
20121
|
-
* Visit children of tree which pass
|
|
20121
|
+
* Visit children of tree which pass test.
|
|
20122
20122
|
*
|
|
20123
|
-
* @param tree
|
|
20124
|
-
*
|
|
20125
|
-
* @param
|
|
20126
|
-
*
|
|
20123
|
+
* @param tree
|
|
20124
|
+
* Tree to walk
|
|
20125
|
+
* @param [test]
|
|
20126
|
+
* `unist-util-is`-compatible test
|
|
20127
|
+
* @param visitor
|
|
20128
|
+
* Function called for nodes that pass `test`.
|
|
20129
|
+
* @param [reverse=false]
|
|
20130
|
+
* Traverse in reverse preorder (NRL) instead of preorder (NLR) (default).
|
|
20127
20131
|
*/
|
|
20128
20132
|
const visitParents =
|
|
20129
20133
|
/**
|
|
20130
20134
|
* @type {(
|
|
20131
|
-
* (<Tree extends Node, Check extends Test>(tree: Tree, test: Check, visitor: import('./complex-types').BuildVisitor<Tree, Check>, reverse?: boolean) => void) &
|
|
20132
|
-
* (<Tree extends Node>(tree: Tree, visitor: import('./complex-types').BuildVisitor<Tree>, reverse?: boolean) => void)
|
|
20135
|
+
* (<Tree extends Node, Check extends Test>(tree: Tree, test: Check, visitor: import('./complex-types.js').BuildVisitor<Tree, Check>, reverse?: boolean) => void) &
|
|
20136
|
+
* (<Tree extends Node>(tree: Tree, visitor: import('./complex-types.js').BuildVisitor<Tree>, reverse?: boolean) => void)
|
|
20133
20137
|
* )}
|
|
20134
20138
|
*/
|
|
20135
20139
|
(
|
|
20136
20140
|
/**
|
|
20137
20141
|
* @param {Node} tree
|
|
20138
20142
|
* @param {Test} test
|
|
20139
|
-
* @param {import('./complex-types').Visitor<Node>} visitor
|
|
20140
|
-
* @param {boolean} [reverse]
|
|
20143
|
+
* @param {import('./complex-types.js').Visitor<Node>} visitor
|
|
20144
|
+
* @param {boolean} [reverse=false]
|
|
20141
20145
|
*/
|
|
20142
20146
|
function (tree, test, visitor, reverse) {
|
|
20143
20147
|
if (typeof test === 'function' && typeof visitor !== 'function') {
|
|
@@ -20155,10 +20159,10 @@ const visitParents =
|
|
|
20155
20159
|
/**
|
|
20156
20160
|
* @param {Node} node
|
|
20157
20161
|
* @param {number?} index
|
|
20158
|
-
* @param {Array
|
|
20162
|
+
* @param {Array<Parent>} parents
|
|
20159
20163
|
*/
|
|
20160
20164
|
function factory(node, index, parents) {
|
|
20161
|
-
/** @type {
|
|
20165
|
+
/** @type {Record<string, unknown>} */
|
|
20162
20166
|
// @ts-expect-error: hush
|
|
20163
20167
|
const value = typeof node === 'object' && node !== null ? node : {}
|
|
20164
20168
|
/** @type {string|undefined} */
|
|
@@ -20189,7 +20193,7 @@ const visitParents =
|
|
|
20189
20193
|
let subresult
|
|
20190
20194
|
/** @type {number} */
|
|
20191
20195
|
let offset
|
|
20192
|
-
/** @type {Array
|
|
20196
|
+
/** @type {Array<Parent>} */
|
|
20193
20197
|
let grandparents
|
|
20194
20198
|
|
|
20195
20199
|
if (!test || is(node, index, parents[parents.length - 1] || null)) {
|
|
@@ -20249,33 +20253,35 @@ function toResult(value) {
|
|
|
20249
20253
|
* @typedef {import('unist').Parent} Parent
|
|
20250
20254
|
* @typedef {import('unist-util-is').Test} Test
|
|
20251
20255
|
* @typedef {import('unist-util-visit-parents').VisitorResult} VisitorResult
|
|
20252
|
-
* @typedef {import('./complex-types').Visitor} Visitor
|
|
20256
|
+
* @typedef {import('./complex-types.js').Visitor} Visitor
|
|
20253
20257
|
*/
|
|
20254
20258
|
|
|
20255
20259
|
|
|
20256
20260
|
|
|
20257
|
-
|
|
20258
|
-
|
|
20259
20261
|
/**
|
|
20260
|
-
* Visit children of tree which pass
|
|
20262
|
+
* Visit children of tree which pass test.
|
|
20261
20263
|
*
|
|
20262
|
-
* @param tree
|
|
20263
|
-
*
|
|
20264
|
-
* @param
|
|
20265
|
-
*
|
|
20264
|
+
* @param tree
|
|
20265
|
+
* Tree to walk
|
|
20266
|
+
* @param [test]
|
|
20267
|
+
* `unist-util-is`-compatible test
|
|
20268
|
+
* @param visitor
|
|
20269
|
+
* Function called for nodes that pass `test`.
|
|
20270
|
+
* @param reverse
|
|
20271
|
+
* Traverse in reverse preorder (NRL) instead of preorder (NLR) (default).
|
|
20266
20272
|
*/
|
|
20267
20273
|
const visit =
|
|
20268
20274
|
/**
|
|
20269
20275
|
* @type {(
|
|
20270
|
-
* (<Tree extends Node, Check extends Test>(tree: Tree, test: Check, visitor: import('./complex-types').BuildVisitor<Tree, Check>, reverse?: boolean) => void) &
|
|
20271
|
-
* (<Tree extends Node>(tree: Tree, visitor: import('./complex-types').BuildVisitor<Tree>, reverse?: boolean) => void)
|
|
20276
|
+
* (<Tree extends Node, Check extends Test>(tree: Tree, test: Check, visitor: import('./complex-types.js').BuildVisitor<Tree, Check>, reverse?: boolean) => void) &
|
|
20277
|
+
* (<Tree extends Node>(tree: Tree, visitor: import('./complex-types.js').BuildVisitor<Tree>, reverse?: boolean) => void)
|
|
20272
20278
|
* )}
|
|
20273
20279
|
*/
|
|
20274
20280
|
(
|
|
20275
20281
|
/**
|
|
20276
20282
|
* @param {Node} tree
|
|
20277
20283
|
* @param {Test} test
|
|
20278
|
-
* @param {import('./complex-types').Visitor} visitor
|
|
20284
|
+
* @param {import('./complex-types.js').Visitor} visitor
|
|
20279
20285
|
* @param {boolean} [reverse]
|
|
20280
20286
|
*/
|
|
20281
20287
|
function (tree, test, visitor, reverse) {
|
|
@@ -20289,7 +20295,7 @@ const visit =
|
|
|
20289
20295
|
|
|
20290
20296
|
/**
|
|
20291
20297
|
* @param {Node} node
|
|
20292
|
-
* @param {Array
|
|
20298
|
+
* @param {Array<Parent>} parents
|
|
20293
20299
|
*/
|
|
20294
20300
|
function overload(node, parents) {
|
|
20295
20301
|
const parent = parents[parents.length - 1]
|
|
@@ -20302,6 +20308,8 @@ const visit =
|
|
|
20302
20308
|
}
|
|
20303
20309
|
)
|
|
20304
20310
|
|
|
20311
|
+
|
|
20312
|
+
|
|
20305
20313
|
;// CONCATENATED MODULE: ../node_modules/unist-util-position/index.js
|
|
20306
20314
|
/**
|
|
20307
20315
|
* @typedef {import('unist').Position} Position
|
|
@@ -31805,7 +31813,7 @@ function arduino(Prism) {
|
|
|
31805
31813
|
;// CONCATENATED MODULE: ../node_modules/refractor/lang/bash.js
|
|
31806
31814
|
// @ts-nocheck
|
|
31807
31815
|
bash.displayName = 'bash'
|
|
31808
|
-
bash.aliases = ['shell']
|
|
31816
|
+
bash.aliases = ['sh', 'shell']
|
|
31809
31817
|
|
|
31810
31818
|
/** @type {import('../core.js').Syntax} */
|
|
31811
31819
|
function bash(Prism) {
|
|
@@ -31913,7 +31921,7 @@ function bash(Prism) {
|
|
|
31913
31921
|
// Highlight variable names as variables in the left-hand part
|
|
31914
31922
|
// of assignments (“=” and “+=”).
|
|
31915
31923
|
'assign-left': {
|
|
31916
|
-
pattern: /(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,
|
|
31924
|
+
pattern: /(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,
|
|
31917
31925
|
inside: {
|
|
31918
31926
|
environment: {
|
|
31919
31927
|
pattern: RegExp('(^|[\\s;|&]|[<>]\\()' + envVars),
|
|
@@ -31924,6 +31932,12 @@ function bash(Prism) {
|
|
|
31924
31932
|
alias: 'variable',
|
|
31925
31933
|
lookbehind: true
|
|
31926
31934
|
},
|
|
31935
|
+
// Highlight parameter names as variables
|
|
31936
|
+
parameter: {
|
|
31937
|
+
pattern: /(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,
|
|
31938
|
+
alias: 'variable',
|
|
31939
|
+
lookbehind: true
|
|
31940
|
+
},
|
|
31927
31941
|
string: [
|
|
31928
31942
|
// Support for Here-documents https://en.wikipedia.org/wiki/Here_document
|
|
31929
31943
|
{
|
|
@@ -31971,7 +31985,7 @@ function bash(Prism) {
|
|
|
31971
31985
|
variable: insideString.variable,
|
|
31972
31986
|
function: {
|
|
31973
31987
|
pattern:
|
|
31974
|
-
/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,
|
|
31988
|
+
/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,
|
|
31975
31989
|
lookbehind: true
|
|
31976
31990
|
},
|
|
31977
31991
|
keyword: {
|
|
@@ -32014,11 +32028,13 @@ function bash(Prism) {
|
|
|
32014
32028
|
}
|
|
32015
32029
|
commandAfterHeredoc.inside = Prism.languages.bash
|
|
32016
32030
|
/* Patterns in command substitution. */
|
|
32031
|
+
|
|
32017
32032
|
var toBeCopied = [
|
|
32018
32033
|
'comment',
|
|
32019
32034
|
'function-name',
|
|
32020
32035
|
'for-or-select',
|
|
32021
32036
|
'assign-left',
|
|
32037
|
+
'parameter',
|
|
32022
32038
|
'string',
|
|
32023
32039
|
'environment',
|
|
32024
32040
|
'function',
|
|
@@ -32031,9 +32047,12 @@ function bash(Prism) {
|
|
|
32031
32047
|
'number'
|
|
32032
32048
|
]
|
|
32033
32049
|
var inside = insideString.variable[1].inside
|
|
32050
|
+
|
|
32034
32051
|
for (var i = 0; i < toBeCopied.length; i++) {
|
|
32035
32052
|
inside[toBeCopied[i]] = Prism.languages.bash[toBeCopied[i]]
|
|
32036
32053
|
}
|
|
32054
|
+
|
|
32055
|
+
Prism.languages.sh = Prism.languages.bash
|
|
32037
32056
|
Prism.languages.shell = Prism.languages.bash
|
|
32038
32057
|
})(Prism)
|
|
32039
32058
|
}
|
|
@@ -32069,6 +32088,7 @@ function csharp(Prism) {
|
|
|
32069
32088
|
* @param {string} [flags]
|
|
32070
32089
|
* @returns {RegExp}
|
|
32071
32090
|
*/
|
|
32091
|
+
|
|
32072
32092
|
function re(pattern, replacements, flags) {
|
|
32073
32093
|
return RegExp(replace(pattern, replacements), flags || '')
|
|
32074
32094
|
}
|
|
@@ -32079,14 +32099,17 @@ function csharp(Prism) {
|
|
|
32079
32099
|
* @param {number} depthLog2
|
|
32080
32100
|
* @returns {string}
|
|
32081
32101
|
*/
|
|
32102
|
+
|
|
32082
32103
|
function nested(pattern, depthLog2) {
|
|
32083
32104
|
for (var i = 0; i < depthLog2; i++) {
|
|
32084
32105
|
pattern = pattern.replace(/<<self>>/g, function () {
|
|
32085
32106
|
return '(?:' + pattern + ')'
|
|
32086
32107
|
})
|
|
32087
32108
|
}
|
|
32109
|
+
|
|
32088
32110
|
return pattern.replace(/<<self>>/g, '[^\\s\\S]')
|
|
32089
32111
|
} // https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/
|
|
32112
|
+
|
|
32090
32113
|
var keywordKinds = {
|
|
32091
32114
|
// keywords which represent a return or variable type
|
|
32092
32115
|
type: 'bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void',
|
|
@@ -32100,9 +32123,11 @@ function csharp(Prism) {
|
|
|
32100
32123
|
other:
|
|
32101
32124
|
'abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield'
|
|
32102
32125
|
} // keywords
|
|
32126
|
+
|
|
32103
32127
|
function keywordsToPattern(words) {
|
|
32104
32128
|
return '\\b(?:' + words.trim().replace(/ /g, '|') + ')\\b'
|
|
32105
32129
|
}
|
|
32130
|
+
|
|
32106
32131
|
var typeDeclarationKeywords = keywordsToPattern(
|
|
32107
32132
|
keywordKinds.typeDeclaration
|
|
32108
32133
|
)
|
|
@@ -32131,7 +32156,9 @@ function csharp(Prism) {
|
|
|
32131
32156
|
' ' +
|
|
32132
32157
|
keywordKinds.other
|
|
32133
32158
|
) // types
|
|
32159
|
+
|
|
32134
32160
|
var generic = nested(/<(?:[^<>;=+\-*/%&|^]|<<self>>)*>/.source, 2) // the idea behind the other forbidden characters is to prevent false positives. Same for tupleElement.
|
|
32161
|
+
|
|
32135
32162
|
var nestedRound = nested(/\((?:[^()]|<<self>>)*\)/.source, 2)
|
|
32136
32163
|
var name = /@?\b[A-Za-z_]\w*\b/.source
|
|
32137
32164
|
var genericName = replace(/<<0>>(?:\s*<<1>>)?/.source, [name, generic])
|
|
@@ -32159,7 +32186,9 @@ function csharp(Prism) {
|
|
|
32159
32186
|
} // strings & characters
|
|
32160
32187
|
// https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/lexical-structure#character-literals
|
|
32161
32188
|
// https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/lexical-structure#string-literals
|
|
32189
|
+
|
|
32162
32190
|
var character = /'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source // simplified pattern
|
|
32191
|
+
|
|
32163
32192
|
var regularString = /"(?:\\.|[^\\"\r\n])*"/.source
|
|
32164
32193
|
var verbatimString = /@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source
|
|
32165
32194
|
Prism.languages.csharp = Prism.languages.extend('clike', {
|
|
@@ -32309,6 +32338,7 @@ function csharp(Prism) {
|
|
|
32309
32338
|
inside: typeInside,
|
|
32310
32339
|
alias: 'class-name'
|
|
32311
32340
|
},
|
|
32341
|
+
|
|
32312
32342
|
/*'explicit-implementation': {
|
|
32313
32343
|
// int IFoo<Foo>.Bar => 0; void IFoo<Foo<Foo>>.Foo<T>();
|
|
32314
32344
|
pattern: replace(/\b<<0>>(?=\.<<1>>)/, className, methodOrPropertyDeclaration),
|
|
@@ -32379,6 +32409,7 @@ alias: 'class-name'
|
|
|
32379
32409
|
}
|
|
32380
32410
|
}
|
|
32381
32411
|
}) // attributes
|
|
32412
|
+
|
|
32382
32413
|
var regularStringOrCharacter = regularString + '|' + character
|
|
32383
32414
|
var regularStringCharacterOrComment = replace(
|
|
32384
32415
|
/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,
|
|
@@ -32390,6 +32421,7 @@ alias: 'class-name'
|
|
|
32390
32421
|
]),
|
|
32391
32422
|
2
|
|
32392
32423
|
) // https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/attributes/#attribute-targets
|
|
32424
|
+
|
|
32393
32425
|
var attrTarget =
|
|
32394
32426
|
/\b(?:assembly|event|field|method|module|param|property|return|type)\b/
|
|
32395
32427
|
.source
|
|
@@ -32427,7 +32459,9 @@ alias: 'class-name'
|
|
|
32427
32459
|
}
|
|
32428
32460
|
}
|
|
32429
32461
|
}) // string interpolation
|
|
32462
|
+
|
|
32430
32463
|
var formatString = /:[^}\r\n]+/.source // multi line
|
|
32464
|
+
|
|
32431
32465
|
var mInterpolationRound = nested(
|
|
32432
32466
|
replace(/[^"'/()]|<<0>>|\(<<self>>*\)/.source, [
|
|
32433
32467
|
regularStringCharacterOrComment
|
|
@@ -32438,6 +32472,7 @@ alias: 'class-name'
|
|
|
32438
32472
|
mInterpolationRound,
|
|
32439
32473
|
formatString
|
|
32440
32474
|
]) // single line
|
|
32475
|
+
|
|
32441
32476
|
var sInterpolationRound = nested(
|
|
32442
32477
|
replace(
|
|
32443
32478
|
/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<<self>>*\)/
|
|
@@ -32450,6 +32485,7 @@ alias: 'class-name'
|
|
|
32450
32485
|
sInterpolationRound,
|
|
32451
32486
|
formatString
|
|
32452
32487
|
])
|
|
32488
|
+
|
|
32453
32489
|
function createInterpolationInside(interpolation, interpolationRound) {
|
|
32454
32490
|
return {
|
|
32455
32491
|
interpolation: {
|
|
@@ -32477,6 +32513,7 @@ alias: 'class-name'
|
|
|
32477
32513
|
string: /[\s\S]+/
|
|
32478
32514
|
}
|
|
32479
32515
|
}
|
|
32516
|
+
|
|
32480
32517
|
Prism.languages.insertBefore('csharp', 'string', {
|
|
32481
32518
|
'interpolation-string': [
|
|
32482
32519
|
{
|
|
@@ -32568,7 +32605,10 @@ function markup(Prism) {
|
|
|
32568
32605
|
pattern: /^=/,
|
|
32569
32606
|
alias: 'attr-equals'
|
|
32570
32607
|
},
|
|
32571
|
-
|
|
32608
|
+
{
|
|
32609
|
+
pattern: /^(\s*)["']|["']$/,
|
|
32610
|
+
lookbehind: true
|
|
32611
|
+
}
|
|
32572
32612
|
]
|
|
32573
32613
|
}
|
|
32574
32614
|
},
|
|
@@ -32593,6 +32633,7 @@ function markup(Prism) {
|
|
|
32593
32633
|
Prism.languages.markup['entity']
|
|
32594
32634
|
Prism.languages.markup['doctype'].inside['internal-subset'].inside =
|
|
32595
32635
|
Prism.languages.markup // Plugin to make entity title show the real entity, idea by Roman Komarov
|
|
32636
|
+
|
|
32596
32637
|
Prism.hooks.add('wrap', function (env) {
|
|
32597
32638
|
if (env.type === 'entity') {
|
|
32598
32639
|
env.attributes['title'] = env.content.value.replace(/&/, '&')
|
|
@@ -32715,7 +32756,14 @@ function css(Prism) {
|
|
|
32715
32756
|
Prism.languages.css = {
|
|
32716
32757
|
comment: /\/\*[\s\S]*?\*\//,
|
|
32717
32758
|
atrule: {
|
|
32718
|
-
pattern:
|
|
32759
|
+
pattern: RegExp(
|
|
32760
|
+
'@[\\w-](?:' +
|
|
32761
|
+
/[^;{\s"']|\s+(?!\s)/.source +
|
|
32762
|
+
'|' +
|
|
32763
|
+
string.source +
|
|
32764
|
+
')*?' +
|
|
32765
|
+
/(?:;|(?=\s*\{))/.source
|
|
32766
|
+
),
|
|
32719
32767
|
inside: {
|
|
32720
32768
|
rule: /^@[\w-]+/,
|
|
32721
32769
|
'selector-function-argument': {
|
|
@@ -32776,6 +32824,7 @@ function css(Prism) {
|
|
|
32776
32824
|
}
|
|
32777
32825
|
Prism.languages.css['atrule'].inside.rest = Prism.languages.css
|
|
32778
32826
|
var markup = Prism.languages.markup
|
|
32827
|
+
|
|
32779
32828
|
if (markup) {
|
|
32780
32829
|
markup.tag.addInlined('style', 'css')
|
|
32781
32830
|
markup.tag.addAttribute('style', 'css')
|
|
@@ -32804,6 +32853,7 @@ function diff(Prism) {
|
|
|
32804
32853
|
*
|
|
32805
32854
|
* @type {Object<string, string>}
|
|
32806
32855
|
*/
|
|
32856
|
+
|
|
32807
32857
|
var PREFIXES = {
|
|
32808
32858
|
'deleted-sign': '-',
|
|
32809
32859
|
'deleted-arrow': '<',
|
|
@@ -32812,16 +32862,20 @@ function diff(Prism) {
|
|
|
32812
32862
|
unchanged: ' ',
|
|
32813
32863
|
diff: '!'
|
|
32814
32864
|
} // add a token for each prefix
|
|
32865
|
+
|
|
32815
32866
|
Object.keys(PREFIXES).forEach(function (name) {
|
|
32816
32867
|
var prefix = PREFIXES[name]
|
|
32817
32868
|
var alias = []
|
|
32869
|
+
|
|
32818
32870
|
if (!/^\w+$/.test(name)) {
|
|
32819
32871
|
// "deleted-sign" -> "deleted"
|
|
32820
32872
|
alias.push(/\w+/.exec(name)[0])
|
|
32821
32873
|
}
|
|
32874
|
+
|
|
32822
32875
|
if (name === 'diff') {
|
|
32823
32876
|
alias.push('bold')
|
|
32824
32877
|
}
|
|
32878
|
+
|
|
32825
32879
|
Prism.languages.diff[name] = {
|
|
32826
32880
|
pattern: RegExp(
|
|
32827
32881
|
'^(?:[' + prefix + '].*(?:\r\n?|\n|(?![\\s\\S])))+',
|
|
@@ -32840,6 +32894,7 @@ function diff(Prism) {
|
|
|
32840
32894
|
}
|
|
32841
32895
|
}
|
|
32842
32896
|
}) // make prefixes available to Diff plugin
|
|
32897
|
+
|
|
32843
32898
|
Object.defineProperty(Prism.languages.diff, 'PREFIXES', {
|
|
32844
32899
|
value: PREFIXES
|
|
32845
32900
|
})
|
|
@@ -32946,7 +33001,9 @@ function java(Prism) {
|
|
|
32946
33001
|
;(function (Prism) {
|
|
32947
33002
|
var keywords =
|
|
32948
33003
|
/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/ // full package (optional) + parent classes (optional)
|
|
33004
|
+
|
|
32949
33005
|
var classNamePrefix = /(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source // based on the java naming conventions
|
|
33006
|
+
|
|
32950
33007
|
var className = {
|
|
32951
33008
|
pattern: RegExp(
|
|
32952
33009
|
/(^|[^\w.])/.source +
|
|
@@ -33011,7 +33068,8 @@ function java(Prism) {
|
|
|
33011
33068
|
pattern:
|
|
33012
33069
|
/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,
|
|
33013
33070
|
lookbehind: true
|
|
33014
|
-
}
|
|
33071
|
+
},
|
|
33072
|
+
constant: /\b[A-Z][A-Z_\d]+\b/
|
|
33015
33073
|
})
|
|
33016
33074
|
Prism.languages.insertBefore('java', 'string', {
|
|
33017
33075
|
'triple-quoted-string': {
|
|
@@ -33115,6 +33173,7 @@ function regex(Prism) {
|
|
|
33115
33173
|
}
|
|
33116
33174
|
var rangeChar = '(?:[^\\\\-]|' + escape.source + ')'
|
|
33117
33175
|
var range = RegExp(rangeChar + '-' + rangeChar) // the name of a capturing group
|
|
33176
|
+
|
|
33118
33177
|
var groupName = {
|
|
33119
33178
|
pattern: /(<|')[^<>']+(?=[>']$)/,
|
|
33120
33179
|
lookbehind: true,
|
|
@@ -33370,15 +33429,18 @@ function javascript(Prism) {
|
|
|
33370
33429
|
alias: 'property'
|
|
33371
33430
|
}
|
|
33372
33431
|
})
|
|
33432
|
+
|
|
33373
33433
|
if (Prism.languages.markup) {
|
|
33374
33434
|
Prism.languages.markup.tag.addInlined('script', 'javascript') // add attribute support for all DOM events.
|
|
33375
33435
|
// https://developer.mozilla.org/en-US/docs/Web/Events#Standard_events
|
|
33436
|
+
|
|
33376
33437
|
Prism.languages.markup.tag.addAttribute(
|
|
33377
33438
|
/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)/
|
|
33378
33439
|
.source,
|
|
33379
33440
|
'javascript'
|
|
33380
33441
|
)
|
|
33381
33442
|
}
|
|
33443
|
+
|
|
33382
33444
|
Prism.languages.js = Prism.languages.javascript
|
|
33383
33445
|
}
|
|
33384
33446
|
|
|
@@ -33658,8 +33720,10 @@ function yaml(Prism) {
|
|
|
33658
33720
|
// https://yaml.org/spec/1.2/spec.html#c-ns-anchor-property
|
|
33659
33721
|
// https://yaml.org/spec/1.2/spec.html#c-ns-alias-node
|
|
33660
33722
|
var anchorOrAlias = /[*&][^\s[\]{},]+/ // https://yaml.org/spec/1.2/spec.html#c-ns-tag-property
|
|
33723
|
+
|
|
33661
33724
|
var tag =
|
|
33662
33725
|
/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/ // https://yaml.org/spec/1.2/spec.html#c-ns-properties(n,c)
|
|
33726
|
+
|
|
33663
33727
|
var properties =
|
|
33664
33728
|
'(?:' +
|
|
33665
33729
|
tag.source +
|
|
@@ -33672,6 +33736,7 @@ function yaml(Prism) {
|
|
|
33672
33736
|
')?)' // https://yaml.org/spec/1.2/spec.html#ns-plain(n,c)
|
|
33673
33737
|
// This is a simplified version that doesn't support "#" and multiline keys
|
|
33674
33738
|
// All these long scarry character classes are simplified versions of YAML's characters
|
|
33739
|
+
|
|
33675
33740
|
var plainKey =
|
|
33676
33741
|
/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(
|
|
33677
33742
|
/<PLAIN>/g,
|
|
@@ -33687,8 +33752,10 @@ function yaml(Prism) {
|
|
|
33687
33752
|
* @param {string} [flags]
|
|
33688
33753
|
* @returns {RegExp}
|
|
33689
33754
|
*/
|
|
33755
|
+
|
|
33690
33756
|
function createValuePattern(value, flags) {
|
|
33691
33757
|
flags = (flags || '').replace(/m/g, '') + 'm' // add m flag
|
|
33758
|
+
|
|
33692
33759
|
var pattern =
|
|
33693
33760
|
/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source
|
|
33694
33761
|
.replace(/<<prop>>/g, function () {
|
|
@@ -33699,6 +33766,7 @@ function yaml(Prism) {
|
|
|
33699
33766
|
})
|
|
33700
33767
|
return RegExp(pattern, flags)
|
|
33701
33768
|
}
|
|
33769
|
+
|
|
33702
33770
|
Prism.languages.yaml = {
|
|
33703
33771
|
scalar: {
|
|
33704
33772
|
pattern: RegExp(
|
|
@@ -33793,12 +33861,14 @@ function markdown(Prism) {
|
|
|
33793
33861
|
* @param {string} pattern
|
|
33794
33862
|
* @returns {RegExp}
|
|
33795
33863
|
*/
|
|
33864
|
+
|
|
33796
33865
|
function createInline(pattern) {
|
|
33797
33866
|
pattern = pattern.replace(/<inner>/g, function () {
|
|
33798
33867
|
return inner
|
|
33799
33868
|
})
|
|
33800
33869
|
return RegExp(/((?:^|[^\\])(?:\\{2})*)/.source + '(?:' + pattern + ')')
|
|
33801
33870
|
}
|
|
33871
|
+
|
|
33802
33872
|
var tableCell = /(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/
|
|
33803
33873
|
.source
|
|
33804
33874
|
var tableRow =
|
|
@@ -34065,12 +34135,15 @@ function markdown(Prism) {
|
|
|
34065
34135
|
if (env.language !== 'markdown' && env.language !== 'md') {
|
|
34066
34136
|
return
|
|
34067
34137
|
}
|
|
34138
|
+
|
|
34068
34139
|
function walkTokens(tokens) {
|
|
34069
34140
|
if (!tokens || typeof tokens === 'string') {
|
|
34070
34141
|
return
|
|
34071
34142
|
}
|
|
34143
|
+
|
|
34072
34144
|
for (var i = 0, l = tokens.length; i < l; i++) {
|
|
34073
34145
|
var token = tokens[i]
|
|
34146
|
+
|
|
34074
34147
|
if (token.type !== 'code') {
|
|
34075
34148
|
walkTokens(token.content)
|
|
34076
34149
|
continue
|
|
@@ -34088,8 +34161,10 @@ function markdown(Prism) {
|
|
|
34088
34161
|
* <span class="punctuation">```</span>
|
|
34089
34162
|
* ];
|
|
34090
34163
|
*/
|
|
34164
|
+
|
|
34091
34165
|
var codeLang = token.content[1]
|
|
34092
34166
|
var codeBlock = token.content[3]
|
|
34167
|
+
|
|
34093
34168
|
if (
|
|
34094
34169
|
codeLang &&
|
|
34095
34170
|
codeBlock &&
|
|
@@ -34102,8 +34177,10 @@ function markdown(Prism) {
|
|
|
34102
34177
|
var lang = codeLang.content
|
|
34103
34178
|
.replace(/\b#/g, 'sharp')
|
|
34104
34179
|
.replace(/\b\+\+/g, 'pp') // only use the first word
|
|
34180
|
+
|
|
34105
34181
|
lang = (/[a-z][\w-]*/i.exec(lang) || [''])[0].toLowerCase()
|
|
34106
34182
|
var alias = 'language-' + lang // add alias
|
|
34183
|
+
|
|
34107
34184
|
if (!codeBlock.alias) {
|
|
34108
34185
|
codeBlock.alias = [alias]
|
|
34109
34186
|
} else if (typeof codeBlock.alias === 'string') {
|
|
@@ -34114,22 +34191,28 @@ function markdown(Prism) {
|
|
|
34114
34191
|
}
|
|
34115
34192
|
}
|
|
34116
34193
|
}
|
|
34194
|
+
|
|
34117
34195
|
walkTokens(env.tokens)
|
|
34118
34196
|
})
|
|
34119
34197
|
Prism.hooks.add('wrap', function (env) {
|
|
34120
34198
|
if (env.type !== 'code-block') {
|
|
34121
34199
|
return
|
|
34122
34200
|
}
|
|
34201
|
+
|
|
34123
34202
|
var codeLang = ''
|
|
34203
|
+
|
|
34124
34204
|
for (var i = 0, l = env.classes.length; i < l; i++) {
|
|
34125
34205
|
var cls = env.classes[i]
|
|
34126
34206
|
var match = /language-(.+)/.exec(cls)
|
|
34207
|
+
|
|
34127
34208
|
if (match) {
|
|
34128
34209
|
codeLang = match[1]
|
|
34129
34210
|
break
|
|
34130
34211
|
}
|
|
34131
34212
|
}
|
|
34213
|
+
|
|
34132
34214
|
var grammar = Prism.languages[codeLang]
|
|
34215
|
+
|
|
34133
34216
|
if (!grammar) {
|
|
34134
34217
|
if (codeLang && codeLang !== 'none' && Prism.plugins.autoloader) {
|
|
34135
34218
|
var id =
|
|
@@ -34140,6 +34223,7 @@ function markdown(Prism) {
|
|
|
34140
34223
|
env.attributes['id'] = id
|
|
34141
34224
|
Prism.plugins.autoloader.loadLanguages(codeLang, function () {
|
|
34142
34225
|
var ele = document.getElementById(id)
|
|
34226
|
+
|
|
34143
34227
|
if (ele) {
|
|
34144
34228
|
ele.innerHTML = Prism.highlight(
|
|
34145
34229
|
ele.textContent,
|
|
@@ -34165,12 +34249,14 @@ function markdown(Prism) {
|
|
|
34165
34249
|
*
|
|
34166
34250
|
* @see {@link https://github.com/lodash/lodash/blob/2da024c3b4f9947a48517639de7560457cd4ec6c/unescape.js#L2}
|
|
34167
34251
|
*/
|
|
34252
|
+
|
|
34168
34253
|
var KNOWN_ENTITY_NAMES = {
|
|
34169
34254
|
amp: '&',
|
|
34170
34255
|
lt: '<',
|
|
34171
34256
|
gt: '>',
|
|
34172
34257
|
quot: '"'
|
|
34173
34258
|
} // IE 11 doesn't support `String.fromCodePoint`
|
|
34259
|
+
|
|
34174
34260
|
var fromCodePoint = String.fromCodePoint || String.fromCharCode
|
|
34175
34261
|
/**
|
|
34176
34262
|
* Returns the text content of a given HTML source code string.
|
|
@@ -34178,29 +34264,37 @@ function markdown(Prism) {
|
|
|
34178
34264
|
* @param {string} html
|
|
34179
34265
|
* @returns {string}
|
|
34180
34266
|
*/
|
|
34267
|
+
|
|
34181
34268
|
function textContent(html) {
|
|
34182
34269
|
// remove all tags
|
|
34183
34270
|
var text = html.replace(tagPattern, '') // decode known entities
|
|
34271
|
+
|
|
34184
34272
|
text = text.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi, function (m, code) {
|
|
34185
34273
|
code = code.toLowerCase()
|
|
34274
|
+
|
|
34186
34275
|
if (code[0] === '#') {
|
|
34187
34276
|
var value
|
|
34277
|
+
|
|
34188
34278
|
if (code[1] === 'x') {
|
|
34189
34279
|
value = parseInt(code.slice(2), 16)
|
|
34190
34280
|
} else {
|
|
34191
34281
|
value = Number(code.slice(1))
|
|
34192
34282
|
}
|
|
34283
|
+
|
|
34193
34284
|
return fromCodePoint(value)
|
|
34194
34285
|
} else {
|
|
34195
34286
|
var known = KNOWN_ENTITY_NAMES[code]
|
|
34287
|
+
|
|
34196
34288
|
if (known) {
|
|
34197
34289
|
return known
|
|
34198
34290
|
} // unable to decode
|
|
34291
|
+
|
|
34199
34292
|
return m
|
|
34200
34293
|
}
|
|
34201
34294
|
})
|
|
34202
34295
|
return text
|
|
34203
34296
|
}
|
|
34297
|
+
|
|
34204
34298
|
Prism.languages.md = Prism.languages.markdown
|
|
34205
34299
|
})(Prism)
|
|
34206
34300
|
}
|
|
@@ -34391,6 +34485,7 @@ function markupTemplating(Prism) {
|
|
|
34391
34485
|
function getPlaceholder(language, index) {
|
|
34392
34486
|
return '___' + language.toUpperCase() + index + '___'
|
|
34393
34487
|
}
|
|
34488
|
+
|
|
34394
34489
|
Object.defineProperties((Prism.languages['markup-templating'] = {}), {
|
|
34395
34490
|
buildPlaceholders: {
|
|
34396
34491
|
/**
|
|
@@ -34408,22 +34503,27 @@ function markupTemplating(Prism) {
|
|
|
34408
34503
|
if (env.language !== language) {
|
|
34409
34504
|
return
|
|
34410
34505
|
}
|
|
34506
|
+
|
|
34411
34507
|
var tokenStack = (env.tokenStack = [])
|
|
34412
34508
|
env.code = env.code.replace(placeholderPattern, function (match) {
|
|
34413
34509
|
if (typeof replaceFilter === 'function' && !replaceFilter(match)) {
|
|
34414
34510
|
return match
|
|
34415
34511
|
}
|
|
34512
|
+
|
|
34416
34513
|
var i = tokenStack.length
|
|
34417
34514
|
var placeholder // Check for existing strings
|
|
34515
|
+
|
|
34418
34516
|
while (
|
|
34419
34517
|
env.code.indexOf((placeholder = getPlaceholder(language, i))) !==
|
|
34420
34518
|
-1
|
|
34421
34519
|
) {
|
|
34422
34520
|
++i
|
|
34423
34521
|
} // Create a sparse array
|
|
34522
|
+
|
|
34424
34523
|
tokenStack[i] = match
|
|
34425
34524
|
return placeholder
|
|
34426
34525
|
}) // Switch the grammar to markup
|
|
34526
|
+
|
|
34427
34527
|
env.grammar = Prism.languages.markup
|
|
34428
34528
|
}
|
|
34429
34529
|
},
|
|
@@ -34438,16 +34538,20 @@ function markupTemplating(Prism) {
|
|
|
34438
34538
|
if (env.language !== language || !env.tokenStack) {
|
|
34439
34539
|
return
|
|
34440
34540
|
} // Switch the grammar back
|
|
34541
|
+
|
|
34441
34542
|
env.grammar = Prism.languages[language]
|
|
34442
34543
|
var j = 0
|
|
34443
34544
|
var keys = Object.keys(env.tokenStack)
|
|
34545
|
+
|
|
34444
34546
|
function walkTokens(tokens) {
|
|
34445
34547
|
for (var i = 0; i < tokens.length; i++) {
|
|
34446
34548
|
// all placeholders are replaced already
|
|
34447
34549
|
if (j >= keys.length) {
|
|
34448
34550
|
break
|
|
34449
34551
|
}
|
|
34552
|
+
|
|
34450
34553
|
var token = tokens[i]
|
|
34554
|
+
|
|
34451
34555
|
if (
|
|
34452
34556
|
typeof token === 'string' ||
|
|
34453
34557
|
(token.content && typeof token.content === 'string')
|
|
@@ -34457,6 +34561,7 @@ function markupTemplating(Prism) {
|
|
|
34457
34561
|
var s = typeof token === 'string' ? token : token.content
|
|
34458
34562
|
var placeholder = getPlaceholder(language, k)
|
|
34459
34563
|
var index = s.indexOf(placeholder)
|
|
34564
|
+
|
|
34460
34565
|
if (index > -1) {
|
|
34461
34566
|
++j
|
|
34462
34567
|
var before = s.substring(0, index)
|
|
@@ -34468,13 +34573,17 @@ function markupTemplating(Prism) {
|
|
|
34468
34573
|
)
|
|
34469
34574
|
var after = s.substring(index + placeholder.length)
|
|
34470
34575
|
var replacement = []
|
|
34576
|
+
|
|
34471
34577
|
if (before) {
|
|
34472
34578
|
replacement.push.apply(replacement, walkTokens([before]))
|
|
34473
34579
|
}
|
|
34580
|
+
|
|
34474
34581
|
replacement.push(middle)
|
|
34582
|
+
|
|
34475
34583
|
if (after) {
|
|
34476
34584
|
replacement.push.apply(replacement, walkTokens([after]))
|
|
34477
34585
|
}
|
|
34586
|
+
|
|
34478
34587
|
if (typeof token === 'string') {
|
|
34479
34588
|
tokens.splice.apply(tokens, [i, 1].concat(replacement))
|
|
34480
34589
|
} else {
|
|
@@ -34488,8 +34597,10 @@ function markupTemplating(Prism) {
|
|
|
34488
34597
|
walkTokens(token.content)
|
|
34489
34598
|
}
|
|
34490
34599
|
}
|
|
34600
|
+
|
|
34491
34601
|
return tokens
|
|
34492
34602
|
}
|
|
34603
|
+
|
|
34493
34604
|
walkTokens(env.tokens)
|
|
34494
34605
|
}
|
|
34495
34606
|
}
|
|
@@ -34842,6 +34953,7 @@ function php(Prism) {
|
|
|
34842
34953
|
if (!/<\?/.test(env.code)) {
|
|
34843
34954
|
return
|
|
34844
34955
|
}
|
|
34956
|
+
|
|
34845
34957
|
var phpPattern =
|
|
34846
34958
|
/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g
|
|
34847
34959
|
Prism.languages['markup-templating'].buildPlaceholders(
|
|
@@ -35181,12 +35293,14 @@ rust.aliases = []
|
|
|
35181
35293
|
function rust(Prism) {
|
|
35182
35294
|
;(function (Prism) {
|
|
35183
35295
|
var multilineComment = /\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source
|
|
35296
|
+
|
|
35184
35297
|
for (var i = 0; i < 2; i++) {
|
|
35185
35298
|
// support 4 levels of nested comments
|
|
35186
35299
|
multilineComment = multilineComment.replace(/<self>/g, function () {
|
|
35187
35300
|
return multilineComment
|
|
35188
35301
|
})
|
|
35189
35302
|
}
|
|
35303
|
+
|
|
35190
35304
|
multilineComment = multilineComment.replace(/<self>/g, function () {
|
|
35191
35305
|
return /[^\s\S]/.source
|
|
35192
35306
|
})
|
|
@@ -35375,6 +35489,7 @@ function sass(Prism) {
|
|
|
35375
35489
|
delete Prism.languages.sass.property
|
|
35376
35490
|
delete Prism.languages.sass.important // Now that whole lines for other patterns are consumed,
|
|
35377
35491
|
// what's left should be selectors
|
|
35492
|
+
|
|
35378
35493
|
Prism.languages.insertBefore('sass', 'punctuation', {
|
|
35379
35494
|
selector: {
|
|
35380
35495
|
pattern:
|
|
@@ -35691,13 +35806,16 @@ function typescript(Prism) {
|
|
|
35691
35806
|
builtin:
|
|
35692
35807
|
/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/
|
|
35693
35808
|
}) // The keywords TypeScript adds to JavaScript
|
|
35809
|
+
|
|
35694
35810
|
Prism.languages.typescript.keyword.push(
|
|
35695
35811
|
/\b(?:abstract|declare|is|keyof|readonly|require)\b/, // keywords that have to be followed by an identifier
|
|
35696
35812
|
/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/, // This is for `import type *, {}`
|
|
35697
35813
|
/\btype\b(?=\s*(?:[\{*]|$))/
|
|
35698
35814
|
) // doesn't work with TS because TS is too complex
|
|
35815
|
+
|
|
35699
35816
|
delete Prism.languages.typescript['parameter']
|
|
35700
35817
|
delete Prism.languages.typescript['literal-property'] // a version of typescript specifically for highlighting types
|
|
35818
|
+
|
|
35701
35819
|
var typeInside = Prism.languages.extend('typescript', {})
|
|
35702
35820
|
delete typeInside['class-name']
|
|
35703
35821
|
Prism.languages.typescript['class-name'].inside = typeInside
|
|
@@ -37260,7 +37378,7 @@ const Prism = _
|
|
|
37260
37378
|
*
|
|
37261
37379
|
* @typedef {import('prismjs').Languages} Languages
|
|
37262
37380
|
* @typedef {import('prismjs').Grammar} Grammar Whatever this is, Prism handles it.
|
|
37263
|
-
* @typedef {((prism: unknown) => void) & {displayName: string, aliases?: string
|
|
37381
|
+
* @typedef {((prism: unknown) => void) & {displayName: string, aliases?: Array<string>}} Syntax A refractor syntax function
|
|
37264
37382
|
*
|
|
37265
37383
|
* @typedef Refractor Virtual syntax highlighting
|
|
37266
37384
|
* @property {highlight} highlight
|
|
@@ -37623,6 +37741,7 @@ function abap(Prism) {
|
|
|
37623
37741
|
lookbehind: true,
|
|
37624
37742
|
alias: 'string'
|
|
37625
37743
|
},
|
|
37744
|
+
|
|
37626
37745
|
/* End Of Line comments should not interfere with strings when the
|
|
37627
37746
|
quote character occurs within them. We assume a string being highlighted
|
|
37628
37747
|
inside an EOL comment is more acceptable than the opposite.
|
|
@@ -37637,8 +37756,10 @@ inside an EOL comment is more acceptable than the opposite.
|
|
|
37637
37756
|
/(\s|\.|^)(?:\*-INPUT|\?TO|ABAP-SOURCE|ABBREVIATED|ABS|ABSTRACT|ACCEPT|ACCEPTING|ACCESSPOLICY|ACCORDING|ACOS|ACTIVATION|ACTUAL|ADD|ADD-CORRESPONDING|ADJACENT|AFTER|ALIAS|ALIASES|ALIGN|ALL|ALLOCATE|ALPHA|ANALYSIS|ANALYZER|AND|ANY|APPEND|APPENDAGE|APPENDING|APPLICATION|ARCHIVE|AREA|ARITHMETIC|AS|ASCENDING|ASIN|ASPECT|ASSERT|ASSIGN|ASSIGNED|ASSIGNING|ASSOCIATION|ASYNCHRONOUS|AT|ATAN|ATTRIBUTES|AUTHORITY|AUTHORITY-CHECK|AVG|BACK|BACKGROUND|BACKUP|BACKWARD|BADI|BASE|BEFORE|BEGIN|BETWEEN|BIG|BINARY|BINDING|BIT|BIT-AND|BIT-NOT|BIT-OR|BIT-XOR|BLACK|BLANK|BLANKS|BLOB|BLOCK|BLOCKS|BLUE|BOUND|BOUNDARIES|BOUNDS|BOXED|BREAK-POINT|BT|BUFFER|BY|BYPASSING|BYTE|BYTE-CA|BYTE-CN|BYTE-CO|BYTE-CS|BYTE-NA|BYTE-NS|BYTE-ORDER|C|CA|CALL|CALLING|CASE|CAST|CASTING|CATCH|CEIL|CENTER|CENTERED|CHAIN|CHAIN-INPUT|CHAIN-REQUEST|CHANGE|CHANGING|CHANNELS|CHAR-TO-HEX|CHARACTER|CHARLEN|CHECK|CHECKBOX|CIRCULAR|CI_|CLASS|CLASS-CODING|CLASS-DATA|CLASS-EVENTS|CLASS-METHODS|CLASS-POOL|CLEANUP|CLEAR|CLIENT|CLOB|CLOCK|CLOSE|CN|CNT|CO|COALESCE|CODE|CODING|COLLECT|COLOR|COLUMN|COLUMNS|COL_BACKGROUND|COL_GROUP|COL_HEADING|COL_KEY|COL_NEGATIVE|COL_NORMAL|COL_POSITIVE|COL_TOTAL|COMMENT|COMMENTS|COMMIT|COMMON|COMMUNICATION|COMPARING|COMPONENT|COMPONENTS|COMPRESSION|COMPUTE|CONCAT|CONCATENATE|COND|CONDENSE|CONDITION|CONNECT|CONNECTION|CONSTANTS|CONTEXT|CONTEXTS|CONTINUE|CONTROL|CONTROLS|CONV|CONVERSION|CONVERT|COPIES|COPY|CORRESPONDING|COS|COSH|COUNT|COUNTRY|COVER|CP|CPI|CREATE|CREATING|CRITICAL|CS|CURRENCY|CURRENCY_CONVERSION|CURRENT|CURSOR|CURSOR-SELECTION|CUSTOMER|CUSTOMER-FUNCTION|DANGEROUS|DATA|DATABASE|DATAINFO|DATASET|DATE|DAYLIGHT|DBMAXLEN|DD\/MM\/YY|DD\/MM\/YYYY|DDMMYY|DEALLOCATE|DECIMALS|DECIMAL_SHIFT|DECLARATIONS|DEEP|DEFAULT|DEFERRED|DEFINE|DEFINING|DEFINITION|DELETE|DELETING|DEMAND|DEPARTMENT|DESCENDING|DESCRIBE|DESTINATION|DETAIL|DIALOG|DIRECTORY|DISCONNECT|DISPLAY|DISPLAY-MODE|DISTANCE|DISTINCT|DIV|DIVIDE|DIVIDE-CORRESPONDING|DIVISION|DO|DUMMY|DUPLICATE|DUPLICATES|DURATION|DURING|DYNAMIC|DYNPRO|E|EACH|EDIT|EDITOR-CALL|ELSE|ELSEIF|EMPTY|ENABLED|ENABLING|ENCODING|END|END-ENHANCEMENT-SECTION|END-LINES|END-OF-DEFINITION|END-OF-FILE|END-OF-PAGE|END-OF-SELECTION|ENDAT|ENDCASE|ENDCATCH|ENDCHAIN|ENDCLASS|ENDDO|ENDENHANCEMENT|ENDEXEC|ENDFOR|ENDFORM|ENDFUNCTION|ENDIAN|ENDIF|ENDING|ENDINTERFACE|ENDLOOP|ENDMETHOD|ENDMODULE|ENDON|ENDPROVIDE|ENDSELECT|ENDTRY|ENDWHILE|ENGINEERING|ENHANCEMENT|ENHANCEMENT-POINT|ENHANCEMENT-SECTION|ENHANCEMENTS|ENTRIES|ENTRY|ENVIRONMENT|EQ|EQUAL|EQUIV|ERRORMESSAGE|ERRORS|ESCAPE|ESCAPING|EVENT|EVENTS|EXACT|EXCEPT|EXCEPTION|EXCEPTION-TABLE|EXCEPTIONS|EXCLUDE|EXCLUDING|EXEC|EXECUTE|EXISTS|EXIT|EXIT-COMMAND|EXP|EXPAND|EXPANDING|EXPIRATION|EXPLICIT|EXPONENT|EXPORT|EXPORTING|EXTEND|EXTENDED|EXTENSION|EXTRACT|FAIL|FETCH|FIELD|FIELD-GROUPS|FIELD-SYMBOL|FIELD-SYMBOLS|FIELDS|FILE|FILTER|FILTER-TABLE|FILTERS|FINAL|FIND|FIRST|FIRST-LINE|FIXED-POINT|FKEQ|FKGE|FLOOR|FLUSH|FONT|FOR|FORM|FORMAT|FORWARD|FOUND|FRAC|FRAME|FRAMES|FREE|FRIENDS|FROM|FUNCTION|FUNCTION-POOL|FUNCTIONALITY|FURTHER|GAPS|GE|GENERATE|GET|GIVING|GKEQ|GKGE|GLOBAL|GRANT|GREATER|GREEN|GROUP|GROUPS|GT|HANDLE|HANDLER|HARMLESS|HASHED|HAVING|HDB|HEAD-LINES|HEADER|HEADERS|HEADING|HELP-ID|HELP-REQUEST|HIDE|HIGH|HINT|HOLD|HOTSPOT|I|ICON|ID|IDENTIFICATION|IDENTIFIER|IDS|IF|IGNORE|IGNORING|IMMEDIATELY|IMPLEMENTATION|IMPLEMENTATIONS|IMPLEMENTED|IMPLICIT|IMPORT|IMPORTING|IN|INACTIVE|INCL|INCLUDE|INCLUDES|INCLUDING|INCREMENT|INDEX|INDEX-LINE|INFOTYPES|INHERITING|INIT|INITIAL|INITIALIZATION|INNER|INOUT|INPUT|INSERT|INSTANCES|INTENSIFIED|INTERFACE|INTERFACE-POOL|INTERFACES|INTERNAL|INTERVALS|INTO|INVERSE|INVERTED-DATE|IS|ISO|ITERATOR|ITNO|JOB|JOIN|KEEP|KEEPING|KERNEL|KEY|KEYS|KEYWORDS|KIND|LANGUAGE|LAST|LATE|LAYOUT|LE|LEADING|LEAVE|LEFT|LEFT-JUSTIFIED|LEFTPLUS|LEFTSPACE|LEGACY|LENGTH|LESS|LET|LEVEL|LEVELS|LIKE|LINE|LINE-COUNT|LINE-SELECTION|LINE-SIZE|LINEFEED|LINES|LIST|LIST-PROCESSING|LISTBOX|LITTLE|LLANG|LOAD|LOAD-OF-PROGRAM|LOB|LOCAL|LOCALE|LOCATOR|LOG|LOG-POINT|LOG10|LOGFILE|LOGICAL|LONG|LOOP|LOW|LOWER|LPAD|LPI|LT|M|MAIL|MAIN|MAJOR-ID|MAPPING|MARGIN|MARK|MASK|MATCH|MATCHCODE|MAX|MAXIMUM|MEDIUM|MEMBERS|MEMORY|MESH|MESSAGE|MESSAGE-ID|MESSAGES|MESSAGING|METHOD|METHODS|MIN|MINIMUM|MINOR-ID|MM\/DD\/YY|MM\/DD\/YYYY|MMDDYY|MOD|MODE|MODIF|MODIFIER|MODIFY|MODULE|MOVE|MOVE-CORRESPONDING|MULTIPLY|MULTIPLY-CORRESPONDING|NA|NAME|NAMETAB|NATIVE|NB|NE|NESTED|NESTING|NEW|NEW-LINE|NEW-PAGE|NEW-SECTION|NEXT|NO|NO-DISPLAY|NO-EXTENSION|NO-GAP|NO-GAPS|NO-GROUPING|NO-HEADING|NO-SCROLLING|NO-SIGN|NO-TITLE|NO-TOPOFPAGE|NO-ZERO|NODE|NODES|NON-UNICODE|NON-UNIQUE|NOT|NP|NS|NULL|NUMBER|NUMOFCHAR|O|OBJECT|OBJECTS|OBLIGATORY|OCCURRENCE|OCCURRENCES|OCCURS|OF|OFF|OFFSET|OLE|ON|ONLY|OPEN|OPTION|OPTIONAL|OPTIONS|OR|ORDER|OTHER|OTHERS|OUT|OUTER|OUTPUT|OUTPUT-LENGTH|OVERFLOW|OVERLAY|PACK|PACKAGE|PAD|PADDING|PAGE|PAGES|PARAMETER|PARAMETER-TABLE|PARAMETERS|PART|PARTIALLY|PATTERN|PERCENTAGE|PERFORM|PERFORMING|PERSON|PF|PF-STATUS|PINK|PLACES|POOL|POSITION|POS_HIGH|POS_LOW|PRAGMAS|PRECOMPILED|PREFERRED|PRESERVING|PRIMARY|PRINT|PRINT-CONTROL|PRIORITY|PRIVATE|PROCEDURE|PROCESS|PROGRAM|PROPERTY|PROTECTED|PROVIDE|PUBLIC|PUSHBUTTON|PUT|QUEUE-ONLY|QUICKINFO|RADIOBUTTON|RAISE|RAISING|RANGE|RANGES|RAW|READ|READ-ONLY|READER|RECEIVE|RECEIVED|RECEIVER|RECEIVING|RED|REDEFINITION|REDUCE|REDUCED|REF|REFERENCE|REFRESH|REGEX|REJECT|REMOTE|RENAMING|REPLACE|REPLACEMENT|REPLACING|REPORT|REQUEST|REQUESTED|RESERVE|RESET|RESOLUTION|RESPECTING|RESPONSIBLE|RESULT|RESULTS|RESUMABLE|RESUME|RETRY|RETURN|RETURNCODE|RETURNING|RIGHT|RIGHT-JUSTIFIED|RIGHTPLUS|RIGHTSPACE|RISK|RMC_COMMUNICATION_FAILURE|RMC_INVALID_STATUS|RMC_SYSTEM_FAILURE|ROLE|ROLLBACK|ROUND|ROWS|RTTI|RUN|SAP|SAP-SPOOL|SAVING|SCALE_PRESERVING|SCALE_PRESERVING_SCIENTIFIC|SCAN|SCIENTIFIC|SCIENTIFIC_WITH_LEADING_ZERO|SCREEN|SCROLL|SCROLL-BOUNDARY|SCROLLING|SEARCH|SECONDARY|SECONDS|SECTION|SELECT|SELECT-OPTIONS|SELECTION|SELECTION-SCREEN|SELECTION-SET|SELECTION-SETS|SELECTION-TABLE|SELECTIONS|SELECTOR|SEND|SEPARATE|SEPARATED|SET|SHARED|SHIFT|SHORT|SHORTDUMP-ID|SIGN|SIGN_AS_POSTFIX|SIMPLE|SIN|SINGLE|SINH|SIZE|SKIP|SKIPPING|SMART|SOME|SORT|SORTABLE|SORTED|SOURCE|SPACE|SPECIFIED|SPLIT|SPOOL|SPOTS|SQL|SQLSCRIPT|SQRT|STABLE|STAMP|STANDARD|START-OF-SELECTION|STARTING|STATE|STATEMENT|STATEMENTS|STATIC|STATICS|STATUSINFO|STEP-LOOP|STOP|STRLEN|STRUCTURE|STRUCTURES|STYLE|SUBKEY|SUBMATCHES|SUBMIT|SUBROUTINE|SUBSCREEN|SUBSTRING|SUBTRACT|SUBTRACT-CORRESPONDING|SUFFIX|SUM|SUMMARY|SUMMING|SUPPLIED|SUPPLY|SUPPRESS|SWITCH|SWITCHSTATES|SYMBOL|SYNCPOINTS|SYNTAX|SYNTAX-CHECK|SYNTAX-TRACE|SYSTEM-CALL|SYSTEM-EXCEPTIONS|SYSTEM-EXIT|TAB|TABBED|TABLE|TABLES|TABLEVIEW|TABSTRIP|TAN|TANH|TARGET|TASK|TASKS|TEST|TESTING|TEXT|TEXTPOOL|THEN|THROW|TIME|TIMES|TIMESTAMP|TIMEZONE|TITLE|TITLE-LINES|TITLEBAR|TO|TOKENIZATION|TOKENS|TOP-LINES|TOP-OF-PAGE|TRACE-FILE|TRACE-TABLE|TRAILING|TRANSACTION|TRANSFER|TRANSFORMATION|TRANSLATE|TRANSPORTING|TRMAC|TRUNC|TRUNCATE|TRUNCATION|TRY|TYPE|TYPE-POOL|TYPE-POOLS|TYPES|ULINE|UNASSIGN|UNDER|UNICODE|UNION|UNIQUE|UNIT|UNIT_CONVERSION|UNIX|UNPACK|UNTIL|UNWIND|UP|UPDATE|UPPER|USER|USER-COMMAND|USING|UTF-8|VALID|VALUE|VALUE-REQUEST|VALUES|VARY|VARYING|VERIFICATION-MESSAGE|VERSION|VIA|VIEW|VISIBLE|WAIT|WARNING|WHEN|WHENEVER|WHERE|WHILE|WIDTH|WINDOW|WINDOWS|WITH|WITH-HEADING|WITH-TITLE|WITHOUT|WORD|WORK|WRITE|WRITER|X|XML|XOR|XSD|XSTRLEN|YELLOW|YES|YYMMDD|Z|ZERO|ZONE)(?![\w-])/i,
|
|
37638
37757
|
lookbehind: true
|
|
37639
37758
|
},
|
|
37759
|
+
|
|
37640
37760
|
/* Numbers can be only integers. Decimal or Hex appear only as strings */
|
|
37641
37761
|
number: /\b\d+\b/,
|
|
37762
|
+
|
|
37642
37763
|
/* Operators must always be surrounded by whitespace, they cannot be put
|
|
37643
37764
|
adjacent to operands.
|
|
37644
37765
|
*/
|
|
@@ -37649,6 +37770,7 @@ adjacent to operands.
|
|
|
37649
37770
|
'string-operator': {
|
|
37650
37771
|
pattern: /(\s)&&?(?=\s)/,
|
|
37651
37772
|
lookbehind: true,
|
|
37773
|
+
|
|
37652
37774
|
/* The official editor highlights */
|
|
37653
37775
|
alias: 'keyword'
|
|
37654
37776
|
},
|
|
@@ -37749,8 +37871,10 @@ function actionscript(Prism) {
|
|
|
37749
37871
|
operator: /\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/
|
|
37750
37872
|
})
|
|
37751
37873
|
Prism.languages.actionscript['class-name'].alias = 'function' // doesn't work with AS because AS is too complex
|
|
37874
|
+
|
|
37752
37875
|
delete Prism.languages.actionscript['parameter']
|
|
37753
37876
|
delete Prism.languages.actionscript['literal-property']
|
|
37877
|
+
|
|
37754
37878
|
if (Prism.languages.markup) {
|
|
37755
37879
|
Prism.languages.insertBefore('actionscript', 'string', {
|
|
37756
37880
|
xml: {
|
|
@@ -38020,6 +38144,7 @@ function apex(Prism) {
|
|
|
38020
38144
|
}
|
|
38021
38145
|
)
|
|
38022
38146
|
/** @param {string} pattern */
|
|
38147
|
+
|
|
38023
38148
|
function insertClassName(pattern) {
|
|
38024
38149
|
return RegExp(
|
|
38025
38150
|
pattern.replace(/<CLASS-NAME>/g, function () {
|
|
@@ -38028,6 +38153,7 @@ function apex(Prism) {
|
|
|
38028
38153
|
'i'
|
|
38029
38154
|
)
|
|
38030
38155
|
}
|
|
38156
|
+
|
|
38031
38157
|
var classNameInside = {
|
|
38032
38158
|
keyword: keywords,
|
|
38033
38159
|
punctuation: /[()\[\]{};,:.<>]/
|
|
@@ -38318,6 +38444,7 @@ function arturo(Prism) {
|
|
|
38318
38444
|
}
|
|
38319
38445
|
}
|
|
38320
38446
|
}
|
|
38447
|
+
|
|
38321
38448
|
Prism.languages.arturo = {
|
|
38322
38449
|
comment: {
|
|
38323
38450
|
pattern: /;.*/,
|
|
@@ -38424,7 +38551,7 @@ function asciidoc(Prism) {
|
|
|
38424
38551
|
}
|
|
38425
38552
|
var asciidoc = (Prism.languages.asciidoc = {
|
|
38426
38553
|
'comment-block': {
|
|
38427
|
-
pattern: /^(\/{4,})
|
|
38554
|
+
pattern: /^(\/{4,})$[\s\S]*?^\1/m,
|
|
38428
38555
|
alias: 'comment'
|
|
38429
38556
|
},
|
|
38430
38557
|
table: {
|
|
@@ -38442,22 +38569,21 @@ function asciidoc(Prism) {
|
|
|
38442
38569
|
}
|
|
38443
38570
|
},
|
|
38444
38571
|
'passthrough-block': {
|
|
38445
|
-
pattern: /^(\+{4,})
|
|
38572
|
+
pattern: /^(\+{4,})$[\s\S]*?^\1$/m,
|
|
38446
38573
|
inside: {
|
|
38447
38574
|
punctuation: /^\++|\++$/ // See rest below
|
|
38448
38575
|
}
|
|
38449
38576
|
},
|
|
38450
38577
|
// Literal blocks and listing blocks
|
|
38451
38578
|
'literal-block': {
|
|
38452
|
-
pattern: /^(-{4,}|\.{4,})
|
|
38579
|
+
pattern: /^(-{4,}|\.{4,})$[\s\S]*?^\1$/m,
|
|
38453
38580
|
inside: {
|
|
38454
38581
|
punctuation: /^(?:-+|\.+)|(?:-+|\.+)$/ // See rest below
|
|
38455
38582
|
}
|
|
38456
38583
|
},
|
|
38457
38584
|
// Sidebar blocks, quote blocks, example blocks and open blocks
|
|
38458
38585
|
'other-block': {
|
|
38459
|
-
pattern:
|
|
38460
|
-
/^(--|\*{4,}|_{4,}|={4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,
|
|
38586
|
+
pattern: /^(--|\*{4,}|_{4,}|={4,})$[\s\S]*?^\1$/m,
|
|
38461
38587
|
inside: {
|
|
38462
38588
|
punctuation: /^(?:-+|\*+|_+|=+)|(?:-+|\*+|_+|=+)$/ // See rest below
|
|
38463
38589
|
}
|
|
@@ -38588,14 +38714,18 @@ They are, in order: __emphasis__, **strong**, ++monospace++, +++passthrough+++,
|
|
|
38588
38714
|
alias: 'punctuation'
|
|
38589
38715
|
}
|
|
38590
38716
|
}) // Allow some nesting. There is no recursion though, so cloning should not be needed.
|
|
38717
|
+
|
|
38591
38718
|
function copyFromAsciiDoc(keys) {
|
|
38592
38719
|
keys = keys.split(' ')
|
|
38593
38720
|
var o = {}
|
|
38721
|
+
|
|
38594
38722
|
for (var i = 0, l = keys.length; i < l; i++) {
|
|
38595
38723
|
o[keys[i]] = asciidoc[keys[i]]
|
|
38596
38724
|
}
|
|
38725
|
+
|
|
38597
38726
|
return o
|
|
38598
38727
|
}
|
|
38728
|
+
|
|
38599
38729
|
attributes.inside['interpreted'].inside.rest = copyFromAsciiDoc(
|
|
38600
38730
|
'macro inline replacement entity'
|
|
38601
38731
|
)
|
|
@@ -38610,6 +38740,7 @@ They are, in order: __emphasis__, **strong**, ++monospace++, +++passthrough+++,
|
|
|
38610
38740
|
asciidoc['title'].inside.rest = copyFromAsciiDoc(
|
|
38611
38741
|
'macro inline replacement entity'
|
|
38612
38742
|
) // Plugin to make entity title show the real entity, idea by Roman Komarov
|
|
38743
|
+
|
|
38613
38744
|
Prism.hooks.add('wrap', function (env) {
|
|
38614
38745
|
if (env.type === 'entity') {
|
|
38615
38746
|
env.attributes['title'] = env.content.value.replace(/&/, '&')
|
|
@@ -38655,8 +38786,10 @@ function aspnet(Prism) {
|
|
|
38655
38786
|
}
|
|
38656
38787
|
}
|
|
38657
38788
|
}) // Regexp copied from prism-markup, with a negative look-ahead added
|
|
38789
|
+
|
|
38658
38790
|
Prism.languages.aspnet.tag.pattern =
|
|
38659
38791
|
/<(?!%)\/?[^\s>\/]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/ // match directives of attribute value foo="<% Bar %>"
|
|
38792
|
+
|
|
38660
38793
|
Prism.languages.insertBefore(
|
|
38661
38794
|
'inside',
|
|
38662
38795
|
'punctuation',
|
|
@@ -38671,6 +38804,7 @@ function aspnet(Prism) {
|
|
|
38671
38804
|
alias: ['asp', 'comment']
|
|
38672
38805
|
}
|
|
38673
38806
|
}) // script runat="server" contains csharp, not javascript
|
|
38807
|
+
|
|
38674
38808
|
Prism.languages.insertBefore(
|
|
38675
38809
|
'aspnet',
|
|
38676
38810
|
Prism.languages.javascript ? 'script' : 'tag',
|
|
@@ -38889,9 +39023,11 @@ function avisynth(Prism) {
|
|
|
38889
39023
|
return replacements[+index]
|
|
38890
39024
|
})
|
|
38891
39025
|
}
|
|
39026
|
+
|
|
38892
39027
|
function re(pattern, replacements, flags) {
|
|
38893
39028
|
return RegExp(replace(pattern, replacements), flags || '')
|
|
38894
39029
|
}
|
|
39030
|
+
|
|
38895
39031
|
var types = /bool|clip|float|int|string|val/.source
|
|
38896
39032
|
var internals = [
|
|
38897
39033
|
// bools
|
|
@@ -39287,6 +39423,35 @@ function bbcode(Prism) {
|
|
|
39287
39423
|
Prism.languages.shortcode = Prism.languages.bbcode
|
|
39288
39424
|
}
|
|
39289
39425
|
|
|
39426
|
+
;// CONCATENATED MODULE: ../node_modules/refractor/lang/bbj.js
|
|
39427
|
+
// @ts-nocheck
|
|
39428
|
+
bbj.displayName = 'bbj'
|
|
39429
|
+
bbj.aliases = []
|
|
39430
|
+
|
|
39431
|
+
/** @type {import('../core.js').Syntax} */
|
|
39432
|
+
function bbj(Prism) {
|
|
39433
|
+
;(function (Prism) {
|
|
39434
|
+
Prism.languages.bbj = {
|
|
39435
|
+
comment: {
|
|
39436
|
+
pattern: /(^|[^\\:])rem\s+.*/i,
|
|
39437
|
+
lookbehind: true,
|
|
39438
|
+
greedy: true
|
|
39439
|
+
},
|
|
39440
|
+
string: {
|
|
39441
|
+
pattern: /(['"])(?:(?!\1|\\).|\\.)*\1/,
|
|
39442
|
+
greedy: true
|
|
39443
|
+
},
|
|
39444
|
+
number: /(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,
|
|
39445
|
+
keyword:
|
|
39446
|
+
/\b(?:abstract|all|argc|begin|bye|callback|case|chn|class|classend|ctl|day|declare|delete|dim|dom|dread|dsz|else|end|endif|err|exitto|extends|fi|field|for|from|gosub|goto|if|implements|interface|interfaceend|iol|iolist|let|list|load|method|methodend|methodret|on|opts|pfx|print|private|process_events|protected|psz|public|read|read_resource|release|remove_callback|repeat|restore|return|rev|seterr|setesc|sqlchn|sqlunt|ssn|start|static|swend|switch|sys|then|tim|unt|until|use|void|wend|where|while)\b/i,
|
|
39447
|
+
function: /\b\w+(?=\()/,
|
|
39448
|
+
boolean: /\b(?:BBjAPI\.TRUE|BBjAPI\.FALSE)\b/i,
|
|
39449
|
+
operator: /<[=>]?|>=?|[+\-*\/^=&]|\b(?:and|not|or|xor)\b/i,
|
|
39450
|
+
punctuation: /[.,;:()]/
|
|
39451
|
+
}
|
|
39452
|
+
})(Prism)
|
|
39453
|
+
}
|
|
39454
|
+
|
|
39290
39455
|
;// CONCATENATED MODULE: ../node_modules/refractor/lang/bicep.js
|
|
39291
39456
|
// @ts-nocheck
|
|
39292
39457
|
bicep.displayName = 'bicep'
|
|
@@ -39481,6 +39646,79 @@ function bnf(Prism) {
|
|
|
39481
39646
|
Prism.languages.rbnf = Prism.languages.bnf
|
|
39482
39647
|
}
|
|
39483
39648
|
|
|
39649
|
+
;// CONCATENATED MODULE: ../node_modules/refractor/lang/bqn.js
|
|
39650
|
+
// @ts-nocheck
|
|
39651
|
+
bqn.displayName = 'bqn'
|
|
39652
|
+
bqn.aliases = []
|
|
39653
|
+
|
|
39654
|
+
/** @type {import('../core.js').Syntax} */
|
|
39655
|
+
function bqn(Prism) {
|
|
39656
|
+
Prism.languages.bqn = {
|
|
39657
|
+
shebang: {
|
|
39658
|
+
pattern: /^#![ \t]*\/.*/,
|
|
39659
|
+
alias: 'important',
|
|
39660
|
+
greedy: true
|
|
39661
|
+
},
|
|
39662
|
+
comment: {
|
|
39663
|
+
pattern: /#.*/,
|
|
39664
|
+
greedy: true
|
|
39665
|
+
},
|
|
39666
|
+
'string-literal': {
|
|
39667
|
+
pattern: /"(?:[^"]|"")*"/,
|
|
39668
|
+
greedy: true,
|
|
39669
|
+
alias: 'string'
|
|
39670
|
+
},
|
|
39671
|
+
'character-literal': {
|
|
39672
|
+
pattern: /'(?:[\s\S]|[\uD800-\uDBFF][\uDC00-\uDFFF])'/,
|
|
39673
|
+
greedy: true,
|
|
39674
|
+
alias: 'char'
|
|
39675
|
+
},
|
|
39676
|
+
function: /•[\w¯.∞π]+[\w¯.∞π]*/,
|
|
39677
|
+
'dot-notation-on-brackets': {
|
|
39678
|
+
pattern: /\{(?=.*\}\.)|\}\./,
|
|
39679
|
+
alias: 'namespace'
|
|
39680
|
+
},
|
|
39681
|
+
'special-name': {
|
|
39682
|
+
pattern: /(?:𝕨|𝕩|𝕗|𝕘|𝕤|𝕣|𝕎|𝕏|𝔽|𝔾|𝕊|_𝕣_|_𝕣)/,
|
|
39683
|
+
alias: 'keyword'
|
|
39684
|
+
},
|
|
39685
|
+
'dot-notation-on-name': {
|
|
39686
|
+
pattern: /[A-Za-z_][\w¯∞π]*\./,
|
|
39687
|
+
alias: 'namespace'
|
|
39688
|
+
},
|
|
39689
|
+
'word-number-scientific': {
|
|
39690
|
+
pattern: /\d+(?:\.\d+)?[eE]¯?\d+/,
|
|
39691
|
+
alias: 'number'
|
|
39692
|
+
},
|
|
39693
|
+
'word-name': {
|
|
39694
|
+
pattern: /[A-Za-z_][\w¯∞π]*/,
|
|
39695
|
+
alias: 'symbol'
|
|
39696
|
+
},
|
|
39697
|
+
'word-number': {
|
|
39698
|
+
pattern:
|
|
39699
|
+
/[¯∞π]?(?:\d*\.?\b\d+(?:e[+¯]?\d+|E[+¯]?\d+)?|¯|∞|π)(?:j¯?(?:(?:\d+(?:\.\d+)?|\.\d+)(?:e[+¯]?\d+|E[+¯]?\d+)?|¯|∞|π))?/,
|
|
39700
|
+
alias: 'number'
|
|
39701
|
+
},
|
|
39702
|
+
'null-literal': {
|
|
39703
|
+
pattern: /@/,
|
|
39704
|
+
alias: 'char'
|
|
39705
|
+
},
|
|
39706
|
+
'primitive-functions': {
|
|
39707
|
+
pattern: /[-+×÷⋆√⌊⌈|¬∧∨<>≠=≤≥≡≢⊣⊢⥊∾≍⋈↑↓↕«»⌽⍉/⍋⍒⊏⊑⊐⊒∊⍷⊔!]/,
|
|
39708
|
+
alias: 'operator'
|
|
39709
|
+
},
|
|
39710
|
+
'primitive-1-operators': {
|
|
39711
|
+
pattern: /[`˜˘¨⁼⌜´˝˙]/,
|
|
39712
|
+
alias: 'operator'
|
|
39713
|
+
},
|
|
39714
|
+
'primitive-2-operators': {
|
|
39715
|
+
pattern: /[∘⊸⟜○⌾⎉⚇⍟⊘◶⎊]/,
|
|
39716
|
+
alias: 'operator'
|
|
39717
|
+
},
|
|
39718
|
+
punctuation: /[←⇐↩(){}⟨⟩[\]‿·⋄,.;:?]/
|
|
39719
|
+
}
|
|
39720
|
+
}
|
|
39721
|
+
|
|
39484
39722
|
;// CONCATENATED MODULE: ../node_modules/refractor/lang/brainfuck.js
|
|
39485
39723
|
// @ts-nocheck
|
|
39486
39724
|
brainfuck.displayName = 'brainfuck'
|
|
@@ -39845,6 +40083,43 @@ function cil(Prism) {
|
|
|
39845
40083
|
}
|
|
39846
40084
|
}
|
|
39847
40085
|
|
|
40086
|
+
;// CONCATENATED MODULE: ../node_modules/refractor/lang/cilkc.js
|
|
40087
|
+
// @ts-nocheck
|
|
40088
|
+
|
|
40089
|
+
cilkc.displayName = 'cilkc'
|
|
40090
|
+
cilkc.aliases = ['cilk-c']
|
|
40091
|
+
|
|
40092
|
+
/** @type {import('../core.js').Syntax} */
|
|
40093
|
+
function cilkc(Prism) {
|
|
40094
|
+
Prism.register(c)
|
|
40095
|
+
Prism.languages.cilkc = Prism.languages.insertBefore('c', 'function', {
|
|
40096
|
+
'parallel-keyword': {
|
|
40097
|
+
pattern: /\bcilk_(?:for|reducer|s(?:cope|pawn|ync))\b/,
|
|
40098
|
+
alias: 'keyword'
|
|
40099
|
+
}
|
|
40100
|
+
})
|
|
40101
|
+
Prism.languages['cilk-c'] = Prism.languages['cilkc']
|
|
40102
|
+
}
|
|
40103
|
+
|
|
40104
|
+
;// CONCATENATED MODULE: ../node_modules/refractor/lang/cilkcpp.js
|
|
40105
|
+
// @ts-nocheck
|
|
40106
|
+
|
|
40107
|
+
cilkcpp.displayName = 'cilkcpp'
|
|
40108
|
+
cilkcpp.aliases = ['cilk', 'cilk-cpp']
|
|
40109
|
+
|
|
40110
|
+
/** @type {import('../core.js').Syntax} */
|
|
40111
|
+
function cilkcpp(Prism) {
|
|
40112
|
+
Prism.register(cpp)
|
|
40113
|
+
Prism.languages.cilkcpp = Prism.languages.insertBefore('cpp', 'function', {
|
|
40114
|
+
'parallel-keyword': {
|
|
40115
|
+
pattern: /\bcilk_(?:for|reducer|s(?:cope|pawn|ync))\b/,
|
|
40116
|
+
alias: 'keyword'
|
|
40117
|
+
}
|
|
40118
|
+
})
|
|
40119
|
+
Prism.languages['cilk-cpp'] = Prism.languages['cilkcpp']
|
|
40120
|
+
Prism.languages['cilk'] = Prism.languages['cilkcpp']
|
|
40121
|
+
}
|
|
40122
|
+
|
|
39848
40123
|
;// CONCATENATED MODULE: ../node_modules/refractor/lang/clojure.js
|
|
39849
40124
|
// @ts-nocheck
|
|
39850
40125
|
clojure.displayName = 'clojure'
|
|
@@ -40188,6 +40463,7 @@ function csp(Prism) {
|
|
|
40188
40463
|
'i'
|
|
40189
40464
|
)
|
|
40190
40465
|
}
|
|
40466
|
+
|
|
40191
40467
|
Prism.languages.csp = {
|
|
40192
40468
|
directive: {
|
|
40193
40469
|
pattern:
|
|
@@ -40401,11 +40677,13 @@ function coq(Prism) {
|
|
|
40401
40677
|
;(function (Prism) {
|
|
40402
40678
|
// https://github.com/coq/coq
|
|
40403
40679
|
var commentSource = /\(\*(?:[^(*]|\((?!\*)|\*(?!\))|<self>)*\*\)/.source
|
|
40680
|
+
|
|
40404
40681
|
for (var i = 0; i < 2; i++) {
|
|
40405
40682
|
commentSource = commentSource.replace(/<self>/g, function () {
|
|
40406
40683
|
return commentSource
|
|
40407
40684
|
})
|
|
40408
40685
|
}
|
|
40686
|
+
|
|
40409
40687
|
commentSource = commentSource.replace(/<self>/g, '[]')
|
|
40410
40688
|
Prism.languages.coq = {
|
|
40411
40689
|
comment: RegExp(commentSource),
|
|
@@ -40607,6 +40885,7 @@ function cssExtras(Prism) {
|
|
|
40607
40885
|
pattern: /(\b\d+)(?:%|[a-z]+(?![\w-]))/,
|
|
40608
40886
|
lookbehind: true
|
|
40609
40887
|
} // 123 -123 .123 -.123 12.3 -12.3
|
|
40888
|
+
|
|
40610
40889
|
var number = {
|
|
40611
40890
|
pattern: /(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,
|
|
40612
40891
|
lookbehind: true
|
|
@@ -40625,7 +40904,7 @@ function cssExtras(Prism) {
|
|
|
40625
40904
|
color: [
|
|
40626
40905
|
{
|
|
40627
40906
|
pattern:
|
|
40628
|
-
/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,
|
|
40907
|
+
/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,
|
|
40629
40908
|
lookbehind: true
|
|
40630
40909
|
},
|
|
40631
40910
|
{
|
|
@@ -40672,6 +40951,7 @@ function cue(Prism) {
|
|
|
40672
40951
|
// https://cuelang.org/docs/references/spec/
|
|
40673
40952
|
// eslint-disable-next-line regexp/strict
|
|
40674
40953
|
var stringEscape = /\\(?:(?!\2)|\2(?:[^()\r\n]|\([^()]*\)))/.source // eslint-disable-next-line regexp/strict
|
|
40954
|
+
|
|
40675
40955
|
var stringTypes =
|
|
40676
40956
|
/"""(?:[^\\"]|"(?!""\2)|<esc>)*"""/.source + // eslint-disable-next-line regexp/strict
|
|
40677
40957
|
'|' +
|
|
@@ -40901,8 +41181,10 @@ function dart(Prism) {
|
|
|
40901
41181
|
/\b(?:async|sync|yield)\*/,
|
|
40902
41182
|
/\b(?:abstract|assert|async|await|break|case|catch|class|const|continue|covariant|default|deferred|do|dynamic|else|enum|export|extends|extension|external|factory|final|finally|for|get|hide|if|implements|import|in|interface|library|mixin|new|null|on|operator|part|rethrow|return|set|show|static|super|switch|sync|this|throw|try|typedef|var|void|while|with|yield)\b/
|
|
40903
41183
|
] // Handles named imports, such as http.Client
|
|
41184
|
+
|
|
40904
41185
|
var packagePrefix = /(^|[^\w.])(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/
|
|
40905
41186
|
.source // based on the dart naming conventions
|
|
41187
|
+
|
|
40906
41188
|
var className = {
|
|
40907
41189
|
pattern: RegExp(packagePrefix + /[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),
|
|
40908
41190
|
lookbehind: true,
|
|
@@ -41199,6 +41481,7 @@ function django(Prism) {
|
|
|
41199
41481
|
Prism.hooks.add('after-tokenize', function (env) {
|
|
41200
41482
|
markupTemplating.tokenizePlaceholders(env, 'django')
|
|
41201
41483
|
}) // Add an Jinja2 alias
|
|
41484
|
+
|
|
41202
41485
|
Prism.languages.jinja2 = Prism.languages.django
|
|
41203
41486
|
Prism.hooks.add('before-tokenize', function (env) {
|
|
41204
41487
|
markupTemplating.buildPlaceholders(env, 'jinja2', pattern)
|
|
@@ -41263,6 +41546,7 @@ function docker(Prism) {
|
|
|
41263
41546
|
// that quantifiers behave *atomically*. Atomic quantifiers are necessary to prevent exponential backtracking.
|
|
41264
41547
|
var spaceAfterBackSlash =
|
|
41265
41548
|
/\\[\r\n](?:\s|\\[\r\n]|#.*(?!.))*(?![\s#]|\\[\r\n])/.source // At least one space, comment, or line break
|
|
41549
|
+
|
|
41266
41550
|
var space = /(?:[ \t]+(?![ \t])(?:<SP_BS>)?|<SP_BS>)/.source.replace(
|
|
41267
41551
|
/<SP_BS>/g,
|
|
41268
41552
|
function () {
|
|
@@ -41292,6 +41576,7 @@ function docker(Prism) {
|
|
|
41292
41576
|
* @param {string} flags
|
|
41293
41577
|
* @returns {RegExp}
|
|
41294
41578
|
*/
|
|
41579
|
+
|
|
41295
41580
|
function re(source, flags) {
|
|
41296
41581
|
source = source
|
|
41297
41582
|
.replace(/<OPT>/g, function () {
|
|
@@ -41302,6 +41587,7 @@ function docker(Prism) {
|
|
|
41302
41587
|
})
|
|
41303
41588
|
return RegExp(source, flags)
|
|
41304
41589
|
}
|
|
41590
|
+
|
|
41305
41591
|
Prism.languages.docker = {
|
|
41306
41592
|
instruction: {
|
|
41307
41593
|
pattern:
|
|
@@ -41409,6 +41695,7 @@ function dot(Prism) {
|
|
|
41409
41695
|
* @param {string} flags
|
|
41410
41696
|
* @returns {RegExp}
|
|
41411
41697
|
*/
|
|
41698
|
+
|
|
41412
41699
|
function withID(source, flags) {
|
|
41413
41700
|
return RegExp(
|
|
41414
41701
|
source.replace(/<ID>/g, function () {
|
|
@@ -41417,6 +41704,7 @@ function dot(Prism) {
|
|
|
41417
41704
|
flags
|
|
41418
41705
|
)
|
|
41419
41706
|
}
|
|
41707
|
+
|
|
41420
41708
|
Prism.languages.dot = {
|
|
41421
41709
|
comment: {
|
|
41422
41710
|
pattern: /\/\/.*|\/\*[\s\S]*?\*\/|^#.*/m,
|
|
@@ -42232,6 +42520,7 @@ The values of MMMMMMMMMMMMM and EEEE map directly to the mantissa and exponent f
|
|
|
42232
42520
|
}
|
|
42233
42521
|
}
|
|
42234
42522
|
},
|
|
42523
|
+
|
|
42235
42524
|
/* this description of stack effect literal syntax is not complete and not as specific as theoretically possible
|
|
42236
42525
|
trying to do better is more work and regex-computation-time than it's worth though.
|
|
42237
42526
|
- we'd like to have the "delimiter" parts of the stack effect [ (, --, and ) ] be a different (less-important or comment-like) colour to the stack effect contents
|
|
@@ -42297,6 +42586,7 @@ the old pattern, which may be later useful, was: (^|\s)(?:call|execute|eval)?\((
|
|
|
42297
42586
|
lookbehind: true,
|
|
42298
42587
|
alias: 'operator'
|
|
42299
42588
|
},
|
|
42589
|
+
|
|
42300
42590
|
/*
|
|
42301
42591
|
full list of supported word naming conventions: (the convention appears outside of the [brackets])
|
|
42302
42592
|
set-[x]
|
|
@@ -42372,6 +42662,7 @@ see <https://docs.factorcode.org/content/article-conventions.html>
|
|
|
42372
42662
|
pattern: /(^|\s)[^"\s]\S*(?=\s|$)/,
|
|
42373
42663
|
lookbehind: true
|
|
42374
42664
|
},
|
|
42665
|
+
|
|
42375
42666
|
/*
|
|
42376
42667
|
basic first-class string "a"
|
|
42377
42668
|
with escaped double-quote "a\""
|
|
@@ -42393,12 +42684,15 @@ this is fine for a regex-only implementation.
|
|
|
42393
42684
|
inside: string_inside
|
|
42394
42685
|
}
|
|
42395
42686
|
}
|
|
42687
|
+
|
|
42396
42688
|
var escape = function (str) {
|
|
42397
42689
|
return (str + '').replace(/([.?*+\^$\[\]\\(){}|\-])/g, '\\$1')
|
|
42398
42690
|
}
|
|
42691
|
+
|
|
42399
42692
|
var arrToWordsRegExp = function (arr) {
|
|
42400
42693
|
return new RegExp('(^|\\s)(?:' + arr.map(escape).join('|') + ')(?=\\s|$)')
|
|
42401
42694
|
}
|
|
42695
|
+
|
|
42402
42696
|
var builtins = {
|
|
42403
42697
|
'kernel-builtin': [
|
|
42404
42698
|
'or',
|
|
@@ -43113,9 +43407,11 @@ function flow_flow(Prism) {
|
|
|
43113
43407
|
alias: 'punctuation'
|
|
43114
43408
|
}
|
|
43115
43409
|
})
|
|
43410
|
+
|
|
43116
43411
|
if (!Array.isArray(Prism.languages.flow.keyword)) {
|
|
43117
43412
|
Prism.languages.flow.keyword = [Prism.languages.flow.keyword]
|
|
43118
43413
|
}
|
|
43414
|
+
|
|
43119
43415
|
Prism.languages.flow.keyword.unshift(
|
|
43120
43416
|
{
|
|
43121
43417
|
pattern: /(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/,
|
|
@@ -43192,11 +43488,13 @@ function ftl(Prism) {
|
|
|
43192
43488
|
var FTL_EXPR =
|
|
43193
43489
|
/[^<()"']|\((?:<expr>)*\)|<(?!#--)|<#--(?:[^-]|-(?!->))*-->|"(?:[^\\"]|\\.)*"|'(?:[^\\']|\\.)*'/
|
|
43194
43490
|
.source
|
|
43491
|
+
|
|
43195
43492
|
for (var i = 0; i < 2; i++) {
|
|
43196
43493
|
FTL_EXPR = FTL_EXPR.replace(/<expr>/g, function () {
|
|
43197
43494
|
return FTL_EXPR
|
|
43198
43495
|
})
|
|
43199
43496
|
}
|
|
43497
|
+
|
|
43200
43498
|
FTL_EXPR = FTL_EXPR.replace(/<expr>/g, /[^\s\S]/.source)
|
|
43201
43499
|
var ftl = {
|
|
43202
43500
|
comment: /<#--[\s\S]*?-->/,
|
|
@@ -43658,15 +43956,18 @@ function git(Prism) {
|
|
|
43658
43956
|
* nothing to commit (working directory clean)
|
|
43659
43957
|
*/
|
|
43660
43958
|
comment: /^#.*/m,
|
|
43959
|
+
|
|
43661
43960
|
/*
|
|
43662
43961
|
* Regexp to match the changed lines in a git diff output. Check the example below.
|
|
43663
43962
|
*/
|
|
43664
43963
|
deleted: /^[-–].*/m,
|
|
43665
43964
|
inserted: /^\+.*/m,
|
|
43965
|
+
|
|
43666
43966
|
/*
|
|
43667
43967
|
* a string (double and simple quote)
|
|
43668
43968
|
*/
|
|
43669
43969
|
string: /("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,
|
|
43970
|
+
|
|
43670
43971
|
/*
|
|
43671
43972
|
* a git command. It starts with a random prompt finishing by a $, then "git" then some other parameters
|
|
43672
43973
|
* For instance:
|
|
@@ -43684,6 +43985,7 @@ function git(Prism) {
|
|
|
43684
43985
|
parameter: /\s--?\w+/
|
|
43685
43986
|
}
|
|
43686
43987
|
},
|
|
43988
|
+
|
|
43687
43989
|
/*
|
|
43688
43990
|
* Coordinates displayed in a git diff command
|
|
43689
43991
|
* For instance:
|
|
@@ -43698,6 +44000,7 @@ function git(Prism) {
|
|
|
43698
44000
|
* +And this is the second line
|
|
43699
44001
|
*/
|
|
43700
44002
|
coord: /^@@.*@@$/m,
|
|
44003
|
+
|
|
43701
44004
|
/*
|
|
43702
44005
|
* Match a "commit [SHA1]" line in a git log output.
|
|
43703
44006
|
* For instance:
|
|
@@ -43852,6 +44155,76 @@ function goModule(Prism) {
|
|
|
43852
44155
|
}
|
|
43853
44156
|
}
|
|
43854
44157
|
|
|
44158
|
+
;// CONCATENATED MODULE: ../node_modules/refractor/lang/gradle.js
|
|
44159
|
+
// @ts-nocheck
|
|
44160
|
+
|
|
44161
|
+
gradle.displayName = 'gradle'
|
|
44162
|
+
gradle.aliases = []
|
|
44163
|
+
|
|
44164
|
+
/** @type {import('../core.js').Syntax} */
|
|
44165
|
+
function gradle(Prism) {
|
|
44166
|
+
Prism.register(clike)
|
|
44167
|
+
;(function (Prism) {
|
|
44168
|
+
var interpolation = {
|
|
44169
|
+
pattern: /((?:^|[^\\$])(?:\\{2})*)\$(?:\w+|\{[^{}]*\})/,
|
|
44170
|
+
lookbehind: true,
|
|
44171
|
+
inside: {
|
|
44172
|
+
'interpolation-punctuation': {
|
|
44173
|
+
pattern: /^\$\{?|\}$/,
|
|
44174
|
+
alias: 'punctuation'
|
|
44175
|
+
},
|
|
44176
|
+
expression: {
|
|
44177
|
+
pattern: /[\s\S]+/,
|
|
44178
|
+
inside: null
|
|
44179
|
+
}
|
|
44180
|
+
}
|
|
44181
|
+
}
|
|
44182
|
+
Prism.languages.gradle = Prism.languages.extend('clike', {
|
|
44183
|
+
string: {
|
|
44184
|
+
pattern: /'''(?:[^\\]|\\[\s\S])*?'''|'(?:\\.|[^\\'\r\n])*'/,
|
|
44185
|
+
greedy: true
|
|
44186
|
+
},
|
|
44187
|
+
keyword:
|
|
44188
|
+
/\b(?:apply|def|dependencies|else|if|implementation|import|plugin|plugins|project|repositories|repository|sourceSets|tasks|val)\b/,
|
|
44189
|
+
number:
|
|
44190
|
+
/\b(?:0b[01_]+|0x[\da-f_]+(?:\.[\da-f_p\-]+)?|[\d_]+(?:\.[\d_]+)?(?:e[+-]?\d+)?)[glidf]?\b/i,
|
|
44191
|
+
operator: {
|
|
44192
|
+
pattern:
|
|
44193
|
+
/(^|[^.])(?:~|==?~?|\?[.:]?|\*(?:[.=]|\*=?)?|\.[@&]|\.\.<|\.\.(?!\.)|-[-=>]?|\+[+=]?|!=?|<(?:<=?|=>?)?|>(?:>>?=?|=)?|&[&=]?|\|[|=]?|\/=?|\^=?|%=?)/,
|
|
44194
|
+
lookbehind: true
|
|
44195
|
+
},
|
|
44196
|
+
punctuation: /\.+|[{}[\];(),:$]/
|
|
44197
|
+
})
|
|
44198
|
+
Prism.languages.insertBefore('gradle', 'string', {
|
|
44199
|
+
shebang: {
|
|
44200
|
+
pattern: /#!.+/,
|
|
44201
|
+
alias: 'comment',
|
|
44202
|
+
greedy: true
|
|
44203
|
+
},
|
|
44204
|
+
'interpolation-string': {
|
|
44205
|
+
pattern:
|
|
44206
|
+
/"""(?:[^\\]|\\[\s\S])*?"""|(["/])(?:\\.|(?!\1)[^\\\r\n])*\1|\$\/(?:[^/$]|\$(?:[/$]|(?![/$]))|\/(?!\$))*\/\$/,
|
|
44207
|
+
greedy: true,
|
|
44208
|
+
inside: {
|
|
44209
|
+
interpolation: interpolation,
|
|
44210
|
+
string: /[\s\S]+/
|
|
44211
|
+
}
|
|
44212
|
+
}
|
|
44213
|
+
})
|
|
44214
|
+
Prism.languages.insertBefore('gradle', 'punctuation', {
|
|
44215
|
+
'spock-block': /\b(?:and|cleanup|expect|given|setup|then|when|where):/
|
|
44216
|
+
})
|
|
44217
|
+
Prism.languages.insertBefore('gradle', 'function', {
|
|
44218
|
+
annotation: {
|
|
44219
|
+
pattern: /(^|[^.])@\w+/,
|
|
44220
|
+
lookbehind: true,
|
|
44221
|
+
alias: 'punctuation'
|
|
44222
|
+
}
|
|
44223
|
+
})
|
|
44224
|
+
interpolation.inside.expression.inside = Prism.languages.gradle
|
|
44225
|
+
})(Prism)
|
|
44226
|
+
}
|
|
44227
|
+
|
|
43855
44228
|
;// CONCATENATED MODULE: ../node_modules/refractor/lang/graphql.js
|
|
43856
44229
|
// @ts-nocheck
|
|
43857
44230
|
graphql.displayName = 'graphql'
|
|
@@ -43933,6 +44306,7 @@ function graphql(Prism) {
|
|
|
43933
44306
|
* @typedef {InstanceType<import("./prism-core")["Token"]>} Token
|
|
43934
44307
|
* @type {Token[]}
|
|
43935
44308
|
*/
|
|
44309
|
+
|
|
43936
44310
|
var validTokens = env.tokens.filter(function (token) {
|
|
43937
44311
|
return (
|
|
43938
44312
|
typeof token !== 'string' &&
|
|
@@ -43947,6 +44321,7 @@ function graphql(Prism) {
|
|
|
43947
44321
|
* @param {number} offset
|
|
43948
44322
|
* @returns {Token | undefined}
|
|
43949
44323
|
*/
|
|
44324
|
+
|
|
43950
44325
|
function getToken(offset) {
|
|
43951
44326
|
return validTokens[currentIndex + offset]
|
|
43952
44327
|
}
|
|
@@ -43957,14 +44332,18 @@ function graphql(Prism) {
|
|
|
43957
44332
|
* @param {number} [offset=0]
|
|
43958
44333
|
* @returns {boolean}
|
|
43959
44334
|
*/
|
|
44335
|
+
|
|
43960
44336
|
function isTokenType(types, offset) {
|
|
43961
44337
|
offset = offset || 0
|
|
44338
|
+
|
|
43962
44339
|
for (var i = 0; i < types.length; i++) {
|
|
43963
44340
|
var token = getToken(i + offset)
|
|
44341
|
+
|
|
43964
44342
|
if (!token || token.type !== types[i]) {
|
|
43965
44343
|
return false
|
|
43966
44344
|
}
|
|
43967
44345
|
}
|
|
44346
|
+
|
|
43968
44347
|
return true
|
|
43969
44348
|
}
|
|
43970
44349
|
/**
|
|
@@ -43978,22 +44357,27 @@ function graphql(Prism) {
|
|
|
43978
44357
|
* @param {RegExp} close
|
|
43979
44358
|
* @returns {number}
|
|
43980
44359
|
*/
|
|
44360
|
+
|
|
43981
44361
|
function findClosingBracket(open, close) {
|
|
43982
44362
|
var stackHeight = 1
|
|
44363
|
+
|
|
43983
44364
|
for (var i = currentIndex; i < validTokens.length; i++) {
|
|
43984
44365
|
var token = validTokens[i]
|
|
43985
44366
|
var content = token.content
|
|
44367
|
+
|
|
43986
44368
|
if (token.type === 'punctuation' && typeof content === 'string') {
|
|
43987
44369
|
if (open.test(content)) {
|
|
43988
44370
|
stackHeight++
|
|
43989
44371
|
} else if (close.test(content)) {
|
|
43990
44372
|
stackHeight--
|
|
44373
|
+
|
|
43991
44374
|
if (stackHeight === 0) {
|
|
43992
44375
|
return i
|
|
43993
44376
|
}
|
|
43994
44377
|
}
|
|
43995
44378
|
}
|
|
43996
44379
|
}
|
|
44380
|
+
|
|
43997
44381
|
return -1
|
|
43998
44382
|
}
|
|
43999
44383
|
/**
|
|
@@ -44003,52 +44387,69 @@ function graphql(Prism) {
|
|
|
44003
44387
|
* @param {string} alias
|
|
44004
44388
|
* @returns {void}
|
|
44005
44389
|
*/
|
|
44390
|
+
|
|
44006
44391
|
function addAlias(token, alias) {
|
|
44007
44392
|
var aliases = token.alias
|
|
44393
|
+
|
|
44008
44394
|
if (!aliases) {
|
|
44009
44395
|
token.alias = aliases = []
|
|
44010
44396
|
} else if (!Array.isArray(aliases)) {
|
|
44011
44397
|
token.alias = aliases = [aliases]
|
|
44012
44398
|
}
|
|
44399
|
+
|
|
44013
44400
|
aliases.push(alias)
|
|
44014
44401
|
}
|
|
44402
|
+
|
|
44015
44403
|
for (; currentIndex < validTokens.length; ) {
|
|
44016
44404
|
var startToken = validTokens[currentIndex++] // add special aliases for mutation tokens
|
|
44405
|
+
|
|
44017
44406
|
if (startToken.type === 'keyword' && startToken.content === 'mutation') {
|
|
44018
44407
|
// any array of the names of all input variables (if any)
|
|
44019
44408
|
var inputVariables = []
|
|
44409
|
+
|
|
44020
44410
|
if (
|
|
44021
44411
|
isTokenType(['definition-mutation', 'punctuation']) &&
|
|
44022
44412
|
getToken(1).content === '('
|
|
44023
44413
|
) {
|
|
44024
44414
|
// definition
|
|
44025
44415
|
currentIndex += 2 // skip 'definition-mutation' and 'punctuation'
|
|
44416
|
+
|
|
44026
44417
|
var definitionEnd = findClosingBracket(/^\($/, /^\)$/)
|
|
44418
|
+
|
|
44027
44419
|
if (definitionEnd === -1) {
|
|
44028
44420
|
continue
|
|
44029
44421
|
} // find all input variables
|
|
44422
|
+
|
|
44030
44423
|
for (; currentIndex < definitionEnd; currentIndex++) {
|
|
44031
44424
|
var t = getToken(0)
|
|
44425
|
+
|
|
44032
44426
|
if (t.type === 'variable') {
|
|
44033
44427
|
addAlias(t, 'variable-input')
|
|
44034
44428
|
inputVariables.push(t.content)
|
|
44035
44429
|
}
|
|
44036
44430
|
}
|
|
44431
|
+
|
|
44037
44432
|
currentIndex = definitionEnd + 1
|
|
44038
44433
|
}
|
|
44434
|
+
|
|
44039
44435
|
if (
|
|
44040
44436
|
isTokenType(['punctuation', 'property-query']) &&
|
|
44041
44437
|
getToken(0).content === '{'
|
|
44042
44438
|
) {
|
|
44043
44439
|
currentIndex++ // skip opening bracket
|
|
44440
|
+
|
|
44044
44441
|
addAlias(getToken(0), 'property-mutation')
|
|
44442
|
+
|
|
44045
44443
|
if (inputVariables.length > 0) {
|
|
44046
44444
|
var mutationEnd = findClosingBracket(/^\{$/, /^\}$/)
|
|
44445
|
+
|
|
44047
44446
|
if (mutationEnd === -1) {
|
|
44048
44447
|
continue
|
|
44049
44448
|
} // give references to input variables a special alias
|
|
44449
|
+
|
|
44050
44450
|
for (var i = currentIndex; i < mutationEnd; i++) {
|
|
44051
44451
|
var varToken = validTokens[i]
|
|
44452
|
+
|
|
44052
44453
|
if (
|
|
44053
44454
|
varToken.type === 'variable' &&
|
|
44054
44455
|
inputVariables.indexOf(varToken.content) >= 0
|
|
@@ -44150,11 +44551,13 @@ function textile(Prism) {
|
|
|
44150
44551
|
// to not break table pattern |(. foo |). bar |
|
|
44151
44552
|
var modifierRegex = /\([^|()\n]+\)|\[[^\]\n]+\]|\{[^}\n]+\}/.source // Opening and closing parentheses which are not a modifier
|
|
44152
44553
|
// This pattern is necessary to prevent exponential backtracking
|
|
44554
|
+
|
|
44153
44555
|
var parenthesesRegex = /\)|\((?![^|()\n]+\))/.source
|
|
44154
44556
|
/**
|
|
44155
44557
|
* @param {string} source
|
|
44156
44558
|
* @param {string} [flags]
|
|
44157
44559
|
*/
|
|
44560
|
+
|
|
44158
44561
|
function withModifier(source, flags) {
|
|
44159
44562
|
return RegExp(
|
|
44160
44563
|
source
|
|
@@ -44167,6 +44570,7 @@ function textile(Prism) {
|
|
|
44167
44570
|
flags || ''
|
|
44168
44571
|
)
|
|
44169
44572
|
}
|
|
44573
|
+
|
|
44170
44574
|
var modifierTokens = {
|
|
44171
44575
|
css: {
|
|
44172
44576
|
pattern: /\{[^{}]+\}/,
|
|
@@ -44413,14 +44817,17 @@ function textile(Prism) {
|
|
|
44413
44817
|
acronym: phraseInside['acronym'],
|
|
44414
44818
|
mark: phraseInside['mark']
|
|
44415
44819
|
} // Only allow alpha-numeric HTML tags, not XML tags
|
|
44820
|
+
|
|
44416
44821
|
textile.tag.pattern =
|
|
44417
44822
|
/<\/?(?!\d)[a-z0-9]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i // Allow some nesting
|
|
44823
|
+
|
|
44418
44824
|
var phraseInlineInside = phraseInside['inline'].inside
|
|
44419
44825
|
phraseInlineInside['bold'].inside = nestedPatterns
|
|
44420
44826
|
phraseInlineInside['italic'].inside = nestedPatterns
|
|
44421
44827
|
phraseInlineInside['inserted'].inside = nestedPatterns
|
|
44422
44828
|
phraseInlineInside['deleted'].inside = nestedPatterns
|
|
44423
44829
|
phraseInlineInside['span'].inside = nestedPatterns // Allow some styles inside table cells
|
|
44830
|
+
|
|
44424
44831
|
var phraseTableInside = phraseInside['table'].inside
|
|
44425
44832
|
phraseTableInside['inline'] = nestedPatterns['inline']
|
|
44426
44833
|
phraseTableInside['link'] = nestedPatterns['link']
|
|
@@ -44549,6 +44956,7 @@ code |
|
|
|
44549
44956
|
}
|
|
44550
44957
|
var filter_pattern =
|
|
44551
44958
|
'((?:^|\\r?\\n|\\r)([\\t ]*)):{{filter_name}}(?:(?:\\r?\\n|\\r)(?:\\2[\\t ].+|\\s*?(?=\\r?\\n|\\r)))+' // Non exhaustive list of available filters and associated languages
|
|
44959
|
+
|
|
44552
44960
|
var filters = [
|
|
44553
44961
|
'css',
|
|
44554
44962
|
{
|
|
@@ -44564,6 +44972,7 @@ code |
|
|
|
44564
44972
|
'textile'
|
|
44565
44973
|
]
|
|
44566
44974
|
var all_filters = {}
|
|
44975
|
+
|
|
44567
44976
|
for (var i = 0, l = filters.length; i < l; i++) {
|
|
44568
44977
|
var filter = filters[i]
|
|
44569
44978
|
filter =
|
|
@@ -44573,6 +44982,7 @@ code |
|
|
|
44573
44982
|
language: filter
|
|
44574
44983
|
}
|
|
44575
44984
|
: filter
|
|
44985
|
+
|
|
44576
44986
|
if (Prism.languages[filter.language]) {
|
|
44577
44987
|
all_filters['filter-' + filter.filter] = {
|
|
44578
44988
|
pattern: RegExp(
|
|
@@ -44595,6 +45005,7 @@ code |
|
|
|
44595
45005
|
}
|
|
44596
45006
|
}
|
|
44597
45007
|
}
|
|
45008
|
+
|
|
44598
45009
|
Prism.languages.insertBefore('haml', 'filter', all_filters)
|
|
44599
45010
|
})(Prism)
|
|
44600
45011
|
}
|
|
@@ -44934,7 +45345,7 @@ function hoon(Prism) {
|
|
|
44934
45345
|
greedy: true
|
|
44935
45346
|
},
|
|
44936
45347
|
string: {
|
|
44937
|
-
pattern: /"[^"]*"|'[^']*'/,
|
|
45348
|
+
pattern: /"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'/,
|
|
44938
45349
|
greedy: true
|
|
44939
45350
|
},
|
|
44940
45351
|
constant: /%(?:\.[ny]|[\w-]+)/,
|
|
@@ -45103,6 +45514,7 @@ function http(Prism) {
|
|
|
45103
45514
|
function headerValueOf(name) {
|
|
45104
45515
|
return RegExp('(^(?:' + name + '):[ \t]*(?![ \t]))[^]+', 'i')
|
|
45105
45516
|
}
|
|
45517
|
+
|
|
45106
45518
|
Prism.languages.http = {
|
|
45107
45519
|
'request-line': {
|
|
45108
45520
|
pattern:
|
|
@@ -45185,6 +45597,7 @@ function http(Prism) {
|
|
|
45185
45597
|
}
|
|
45186
45598
|
}
|
|
45187
45599
|
} // Create a mapping of Content-Type headers to language definitions
|
|
45600
|
+
|
|
45188
45601
|
var langs = Prism.languages
|
|
45189
45602
|
var httpLanguages = {
|
|
45190
45603
|
'application/javascript': langs.javascript,
|
|
@@ -45195,6 +45608,7 @@ function http(Prism) {
|
|
|
45195
45608
|
'text/css': langs.css,
|
|
45196
45609
|
'text/plain': langs.plain
|
|
45197
45610
|
} // Declare which types can also be suffixes
|
|
45611
|
+
|
|
45198
45612
|
var suffixTypes = {
|
|
45199
45613
|
'application/json': true,
|
|
45200
45614
|
'application/xml': true
|
|
@@ -45205,13 +45619,16 @@ function http(Prism) {
|
|
|
45205
45619
|
* @param {string} contentType
|
|
45206
45620
|
* @returns {string}
|
|
45207
45621
|
*/
|
|
45622
|
+
|
|
45208
45623
|
function getSuffixPattern(contentType) {
|
|
45209
45624
|
var suffix = contentType.replace(/^[a-z]+\//, '')
|
|
45210
45625
|
var suffixPattern = '\\w+/(?:[\\w.-]+\\+)+' + suffix + '(?![+\\w.-])'
|
|
45211
45626
|
return '(?:' + contentType + '|' + suffixPattern + ')'
|
|
45212
45627
|
} // Insert each content type parser that has its associated language
|
|
45213
45628
|
// currently loaded.
|
|
45629
|
+
|
|
45214
45630
|
var options
|
|
45631
|
+
|
|
45215
45632
|
for (var contentType in httpLanguages) {
|
|
45216
45633
|
if (httpLanguages[contentType]) {
|
|
45217
45634
|
options = options || {}
|
|
@@ -45237,6 +45654,7 @@ function http(Prism) {
|
|
|
45237
45654
|
}
|
|
45238
45655
|
}
|
|
45239
45656
|
}
|
|
45657
|
+
|
|
45240
45658
|
if (options) {
|
|
45241
45659
|
Prism.languages.insertBefore('http', 'header', options)
|
|
45242
45660
|
}
|
|
@@ -45325,6 +45743,7 @@ function icuMessageFormat(Prism) {
|
|
|
45325
45743
|
})
|
|
45326
45744
|
}
|
|
45327
45745
|
}
|
|
45746
|
+
|
|
45328
45747
|
var stringPattern = /'[{}:=,](?:[^']|'')*'(?!')/
|
|
45329
45748
|
var escape = {
|
|
45330
45749
|
pattern: /''/,
|
|
@@ -45590,6 +46009,7 @@ function inform7(Prism) {
|
|
|
45590
46009
|
}
|
|
45591
46010
|
Prism.languages.inform7['string'].inside['substitution'].inside.rest =
|
|
45592
46011
|
Prism.languages.inform7 // We don't want the remaining text in the substitution to be highlighted as the string.
|
|
46012
|
+
|
|
45593
46013
|
Prism.languages.inform7['string'].inside['substitution'].inside.rest.text = {
|
|
45594
46014
|
pattern: /\S(?:\s*\S)*/,
|
|
45595
46015
|
alias: 'comment'
|
|
@@ -45698,13 +46118,17 @@ function javadoclike(Prism) {
|
|
|
45698
46118
|
* @param {string} lang the language add doc comment support to.
|
|
45699
46119
|
* @param {(pattern: {inside: {rest: undefined}}) => void} callback the function called with each doc comment pattern as argument.
|
|
45700
46120
|
*/
|
|
46121
|
+
|
|
45701
46122
|
function docCommentSupport(lang, callback) {
|
|
45702
46123
|
var tokenName = 'doc-comment'
|
|
45703
46124
|
var grammar = Prism.languages[lang]
|
|
46125
|
+
|
|
45704
46126
|
if (!grammar) {
|
|
45705
46127
|
return
|
|
45706
46128
|
}
|
|
46129
|
+
|
|
45707
46130
|
var token = grammar[tokenName]
|
|
46131
|
+
|
|
45708
46132
|
if (!token) {
|
|
45709
46133
|
// add doc comment: /** */
|
|
45710
46134
|
var definition = {}
|
|
@@ -45716,12 +46140,14 @@ function javadoclike(Prism) {
|
|
|
45716
46140
|
grammar = Prism.languages.insertBefore(lang, 'comment', definition)
|
|
45717
46141
|
token = grammar[tokenName]
|
|
45718
46142
|
}
|
|
46143
|
+
|
|
45719
46144
|
if (token instanceof RegExp) {
|
|
45720
46145
|
// convert regex to object
|
|
45721
46146
|
token = grammar[tokenName] = {
|
|
45722
46147
|
pattern: token
|
|
45723
46148
|
}
|
|
45724
46149
|
}
|
|
46150
|
+
|
|
45725
46151
|
if (Array.isArray(token)) {
|
|
45726
46152
|
for (var i = 0, l = token.length; i < l; i++) {
|
|
45727
46153
|
if (token[i] instanceof RegExp) {
|
|
@@ -45729,6 +46155,7 @@ function javadoclike(Prism) {
|
|
|
45729
46155
|
pattern: token[i]
|
|
45730
46156
|
}
|
|
45731
46157
|
}
|
|
46158
|
+
|
|
45732
46159
|
callback(token[i])
|
|
45733
46160
|
}
|
|
45734
46161
|
} else {
|
|
@@ -45741,19 +46168,23 @@ function javadoclike(Prism) {
|
|
|
45741
46168
|
* @param {string[]|string} languages
|
|
45742
46169
|
* @param {Object} docLanguage
|
|
45743
46170
|
*/
|
|
46171
|
+
|
|
45744
46172
|
function addSupport(languages, docLanguage) {
|
|
45745
46173
|
if (typeof languages === 'string') {
|
|
45746
46174
|
languages = [languages]
|
|
45747
46175
|
}
|
|
46176
|
+
|
|
45748
46177
|
languages.forEach(function (lang) {
|
|
45749
46178
|
docCommentSupport(lang, function (pattern) {
|
|
45750
46179
|
if (!pattern.inside) {
|
|
45751
46180
|
pattern.inside = {}
|
|
45752
46181
|
}
|
|
46182
|
+
|
|
45753
46183
|
pattern.inside.rest = docLanguage
|
|
45754
46184
|
})
|
|
45755
46185
|
})
|
|
45756
46186
|
}
|
|
46187
|
+
|
|
45757
46188
|
Object.defineProperty(javaDocLike, 'addSupport', {
|
|
45758
46189
|
value: addSupport
|
|
45759
46190
|
})
|
|
@@ -45781,7 +46212,7 @@ function scala(Prism) {
|
|
|
45781
46212
|
greedy: true
|
|
45782
46213
|
},
|
|
45783
46214
|
keyword:
|
|
45784
|
-
/<-|=>|\b(?:abstract|case|catch|class|def|do|else|extends|final|finally|for|forSome|if|implicit|import|lazy|match|new|null|object|override|package|private|protected|return|sealed|self|super|this|throw|trait|try|type|val|var|while|with|yield)\b/,
|
|
46215
|
+
/<-|=>|\b(?:abstract|case|catch|class|def|derives|do|else|enum|extends|extension|final|finally|for|forSome|given|if|implicit|import|infix|inline|lazy|match|new|null|object|opaque|open|override|package|private|protected|return|sealed|self|super|this|throw|trait|transparent|try|type|using|val|var|while|with|yield)\b/,
|
|
45785
46216
|
number:
|
|
45786
46217
|
/\b0x(?:[\da-f]*\.)?[\da-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e\d+)?[dfl]?/i,
|
|
45787
46218
|
builtin:
|
|
@@ -45821,6 +46252,7 @@ function scala(Prism) {
|
|
|
45821
46252
|
})
|
|
45822
46253
|
delete Prism.languages.scala['class-name']
|
|
45823
46254
|
delete Prism.languages.scala['function']
|
|
46255
|
+
delete Prism.languages.scala['constant']
|
|
45824
46256
|
}
|
|
45825
46257
|
|
|
45826
46258
|
;// CONCATENATED MODULE: ../node_modules/refractor/lang/javadoc.js
|
|
@@ -46248,6 +46680,7 @@ function jsTemplates(Prism) {
|
|
|
46248
46680
|
Prism.register(javascript)
|
|
46249
46681
|
;(function (Prism) {
|
|
46250
46682
|
var templateString = Prism.languages.javascript['template-string'] // see the pattern in prism-javascript.js
|
|
46683
|
+
|
|
46251
46684
|
var templateLiteralPattern = templateString.pattern.source
|
|
46252
46685
|
var interpolationObject = templateString.inside['interpolation']
|
|
46253
46686
|
var interpolationPunctuationObject =
|
|
@@ -46264,10 +46697,12 @@ function jsTemplates(Prism) {
|
|
|
46264
46697
|
* @example
|
|
46265
46698
|
* createTemplate('css', /\bcss/.source);
|
|
46266
46699
|
*/
|
|
46700
|
+
|
|
46267
46701
|
function createTemplate(language, tag) {
|
|
46268
46702
|
if (!Prism.languages[language]) {
|
|
46269
46703
|
return undefined
|
|
46270
46704
|
}
|
|
46705
|
+
|
|
46271
46706
|
return {
|
|
46272
46707
|
pattern: RegExp('((?:' + tag + ')\\s*)' + templateLiteralPattern),
|
|
46273
46708
|
lookbehind: true,
|
|
@@ -46284,6 +46719,7 @@ function jsTemplates(Prism) {
|
|
|
46284
46719
|
}
|
|
46285
46720
|
}
|
|
46286
46721
|
}
|
|
46722
|
+
|
|
46287
46723
|
Prism.languages.javascript['template-string'] = [
|
|
46288
46724
|
// styled-jsx:
|
|
46289
46725
|
// css`a { color: #25F; }`
|
|
@@ -46312,6 +46748,7 @@ function jsTemplates(Prism) {
|
|
|
46312
46748
|
* @param {string} language
|
|
46313
46749
|
* @returns {string}
|
|
46314
46750
|
*/
|
|
46751
|
+
|
|
46315
46752
|
function getPlaceholder(counter, language) {
|
|
46316
46753
|
return '___' + language.toUpperCase() + '_' + counter + '___'
|
|
46317
46754
|
}
|
|
@@ -46323,6 +46760,7 @@ function jsTemplates(Prism) {
|
|
|
46323
46760
|
* @param {string} language
|
|
46324
46761
|
* @returns {(string|Token)[]}
|
|
46325
46762
|
*/
|
|
46763
|
+
|
|
46326
46764
|
function tokenizeWithHooks(code, grammar, language) {
|
|
46327
46765
|
var env = {
|
|
46328
46766
|
code: code,
|
|
@@ -46340,11 +46778,14 @@ function jsTemplates(Prism) {
|
|
|
46340
46778
|
* @param {string} expression The code of the expression. E.g. `"${42}"`
|
|
46341
46779
|
* @returns {Token}
|
|
46342
46780
|
*/
|
|
46781
|
+
|
|
46343
46782
|
function tokenizeInterpolationExpression(expression) {
|
|
46344
46783
|
var tempGrammar = {}
|
|
46345
46784
|
tempGrammar['interpolation-punctuation'] = interpolationPunctuationObject
|
|
46346
46785
|
/** @type {Array} */
|
|
46786
|
+
|
|
46347
46787
|
var tokens = Prism.tokenize(expression, tempGrammar)
|
|
46788
|
+
|
|
46348
46789
|
if (tokens.length === 3) {
|
|
46349
46790
|
/**
|
|
46350
46791
|
* The token array will look like this
|
|
@@ -46361,6 +46802,7 @@ function jsTemplates(Prism) {
|
|
|
46361
46802
|
)
|
|
46362
46803
|
tokens.splice.apply(tokens, args)
|
|
46363
46804
|
}
|
|
46805
|
+
|
|
46364
46806
|
return new Prism.Token(
|
|
46365
46807
|
'interpolation',
|
|
46366
46808
|
tokens,
|
|
@@ -46385,9 +46827,11 @@ function jsTemplates(Prism) {
|
|
|
46385
46827
|
* @param {string} language
|
|
46386
46828
|
* @returns {Token}
|
|
46387
46829
|
*/
|
|
46830
|
+
|
|
46388
46831
|
function tokenizeEmbedded(code, grammar, language) {
|
|
46389
46832
|
// 1. First filter out all interpolations
|
|
46390
46833
|
// because they might be escaped, we need a lookbehind, so we use Prism
|
|
46834
|
+
|
|
46391
46835
|
/** @type {(Token|string)[]} */
|
|
46392
46836
|
var _tokens = Prism.tokenize(code, {
|
|
46393
46837
|
interpolation: {
|
|
@@ -46395,9 +46839,12 @@ function jsTemplates(Prism) {
|
|
|
46395
46839
|
lookbehind: true
|
|
46396
46840
|
}
|
|
46397
46841
|
}) // replace all interpolations with a placeholder which is not in the code already
|
|
46842
|
+
|
|
46398
46843
|
var placeholderCounter = 0
|
|
46399
46844
|
/** @type {Object<string, string>} */
|
|
46845
|
+
|
|
46400
46846
|
var placeholderMap = {}
|
|
46847
|
+
|
|
46401
46848
|
var embeddedCode = _tokens
|
|
46402
46849
|
.map(function (token) {
|
|
46403
46850
|
if (typeof token === 'string') {
|
|
@@ -46405,6 +46852,7 @@ function jsTemplates(Prism) {
|
|
|
46405
46852
|
} else {
|
|
46406
46853
|
var interpolationExpression = token.content
|
|
46407
46854
|
var placeholder
|
|
46855
|
+
|
|
46408
46856
|
while (
|
|
46409
46857
|
code.indexOf(
|
|
46410
46858
|
(placeholder = getPlaceholder(placeholderCounter++, language))
|
|
@@ -46412,12 +46860,15 @@ function jsTemplates(Prism) {
|
|
|
46412
46860
|
) {
|
|
46413
46861
|
/* noop */
|
|
46414
46862
|
}
|
|
46863
|
+
|
|
46415
46864
|
placeholderMap[placeholder] = interpolationExpression
|
|
46416
46865
|
return placeholder
|
|
46417
46866
|
}
|
|
46418
46867
|
})
|
|
46419
46868
|
.join('') // 2. Tokenize the embedded code
|
|
46869
|
+
|
|
46420
46870
|
var embeddedTokens = tokenizeWithHooks(embeddedCode, grammar, language) // 3. Re-insert the interpolation
|
|
46871
|
+
|
|
46421
46872
|
var placeholders = Object.keys(placeholderMap)
|
|
46422
46873
|
placeholderCounter = 0
|
|
46423
46874
|
/**
|
|
@@ -46425,12 +46876,15 @@ function jsTemplates(Prism) {
|
|
|
46425
46876
|
* @param {(Token|string)[]} tokens
|
|
46426
46877
|
* @returns {void}
|
|
46427
46878
|
*/
|
|
46879
|
+
|
|
46428
46880
|
function walkTokens(tokens) {
|
|
46429
46881
|
for (var i = 0; i < tokens.length; i++) {
|
|
46430
46882
|
if (placeholderCounter >= placeholders.length) {
|
|
46431
46883
|
return
|
|
46432
46884
|
}
|
|
46885
|
+
|
|
46433
46886
|
var token = tokens[i]
|
|
46887
|
+
|
|
46434
46888
|
if (typeof token === 'string' || typeof token.content === 'string') {
|
|
46435
46889
|
var placeholder = placeholders[placeholderCounter]
|
|
46436
46890
|
var s =
|
|
@@ -46439,6 +46893,7 @@ function jsTemplates(Prism) {
|
|
|
46439
46893
|
: /** @type {string} */
|
|
46440
46894
|
token.content
|
|
46441
46895
|
var index = s.indexOf(placeholder)
|
|
46896
|
+
|
|
46442
46897
|
if (index !== -1) {
|
|
46443
46898
|
++placeholderCounter
|
|
46444
46899
|
var before = s.substring(0, index)
|
|
@@ -46447,15 +46902,19 @@ function jsTemplates(Prism) {
|
|
|
46447
46902
|
)
|
|
46448
46903
|
var after = s.substring(index + placeholder.length)
|
|
46449
46904
|
var replacement = []
|
|
46905
|
+
|
|
46450
46906
|
if (before) {
|
|
46451
46907
|
replacement.push(before)
|
|
46452
46908
|
}
|
|
46909
|
+
|
|
46453
46910
|
replacement.push(middle)
|
|
46911
|
+
|
|
46454
46912
|
if (after) {
|
|
46455
46913
|
var afterTokens = [after]
|
|
46456
46914
|
walkTokens(afterTokens)
|
|
46457
46915
|
replacement.push.apply(replacement, afterTokens)
|
|
46458
46916
|
}
|
|
46917
|
+
|
|
46459
46918
|
if (typeof token === 'string') {
|
|
46460
46919
|
tokens.splice.apply(tokens, [i, 1].concat(replacement))
|
|
46461
46920
|
i += replacement.length - 1
|
|
@@ -46465,6 +46924,7 @@ function jsTemplates(Prism) {
|
|
|
46465
46924
|
}
|
|
46466
46925
|
} else {
|
|
46467
46926
|
var content = token.content
|
|
46927
|
+
|
|
46468
46928
|
if (Array.isArray(content)) {
|
|
46469
46929
|
walkTokens(content)
|
|
46470
46930
|
} else {
|
|
@@ -46473,6 +46933,7 @@ function jsTemplates(Prism) {
|
|
|
46473
46933
|
}
|
|
46474
46934
|
}
|
|
46475
46935
|
}
|
|
46936
|
+
|
|
46476
46937
|
walkTokens(embeddedTokens)
|
|
46477
46938
|
return new Prism.Token(
|
|
46478
46939
|
language,
|
|
@@ -46486,6 +46947,7 @@ function jsTemplates(Prism) {
|
|
|
46486
46947
|
*
|
|
46487
46948
|
* JS templating isn't active for only JavaScript but also related languages like TypeScript, JSX, and TSX.
|
|
46488
46949
|
*/
|
|
46950
|
+
|
|
46489
46951
|
var supportedLanguages = {
|
|
46490
46952
|
javascript: true,
|
|
46491
46953
|
js: true,
|
|
@@ -46504,19 +46966,25 @@ function jsTemplates(Prism) {
|
|
|
46504
46966
|
* @param {(Token | string)[]} tokens
|
|
46505
46967
|
* @returns {void}
|
|
46506
46968
|
*/
|
|
46969
|
+
|
|
46507
46970
|
function findTemplateStrings(tokens) {
|
|
46508
46971
|
for (var i = 0, l = tokens.length; i < l; i++) {
|
|
46509
46972
|
var token = tokens[i]
|
|
46973
|
+
|
|
46510
46974
|
if (typeof token === 'string') {
|
|
46511
46975
|
continue
|
|
46512
46976
|
}
|
|
46977
|
+
|
|
46513
46978
|
var content = token.content
|
|
46979
|
+
|
|
46514
46980
|
if (!Array.isArray(content)) {
|
|
46515
46981
|
if (typeof content !== 'string') {
|
|
46516
46982
|
findTemplateStrings([content])
|
|
46517
46983
|
}
|
|
46984
|
+
|
|
46518
46985
|
continue
|
|
46519
46986
|
}
|
|
46987
|
+
|
|
46520
46988
|
if (token.type === 'template-string') {
|
|
46521
46989
|
/**
|
|
46522
46990
|
* A JavaScript template-string token will look like this:
|
|
@@ -46533,6 +47001,7 @@ function jsTemplates(Prism) {
|
|
|
46533
47001
|
* ]]
|
|
46534
47002
|
*/
|
|
46535
47003
|
var embedded = content[1]
|
|
47004
|
+
|
|
46536
47005
|
if (
|
|
46537
47006
|
content.length === 3 &&
|
|
46538
47007
|
typeof embedded !== 'string' &&
|
|
@@ -46543,10 +47012,12 @@ function jsTemplates(Prism) {
|
|
|
46543
47012
|
var alias = embedded.alias
|
|
46544
47013
|
var language = Array.isArray(alias) ? alias[0] : alias
|
|
46545
47014
|
var grammar = Prism.languages[language]
|
|
47015
|
+
|
|
46546
47016
|
if (!grammar) {
|
|
46547
47017
|
// the embedded language isn't registered.
|
|
46548
47018
|
continue
|
|
46549
47019
|
}
|
|
47020
|
+
|
|
46550
47021
|
content[1] = tokenizeEmbedded(code, grammar, language)
|
|
46551
47022
|
}
|
|
46552
47023
|
} else {
|
|
@@ -46554,6 +47025,7 @@ function jsTemplates(Prism) {
|
|
|
46554
47025
|
}
|
|
46555
47026
|
}
|
|
46556
47027
|
}
|
|
47028
|
+
|
|
46557
47029
|
findTemplateStrings(env.tokens)
|
|
46558
47030
|
})
|
|
46559
47031
|
/**
|
|
@@ -46562,6 +47034,7 @@ function jsTemplates(Prism) {
|
|
|
46562
47034
|
* @param {string | Token | (string | Token)[]} value
|
|
46563
47035
|
* @returns {string}
|
|
46564
47036
|
*/
|
|
47037
|
+
|
|
46565
47038
|
function stringContent(value) {
|
|
46566
47039
|
if (typeof value === 'string') {
|
|
46567
47040
|
return value
|
|
@@ -46751,6 +47224,7 @@ function jsExtras(Prism) {
|
|
|
46751
47224
|
* @param {string} [flags]
|
|
46752
47225
|
* @returns {RegExp}
|
|
46753
47226
|
*/
|
|
47227
|
+
|
|
46754
47228
|
function withId(source, flags) {
|
|
46755
47229
|
return RegExp(
|
|
46756
47230
|
source.replace(/<ID>/g, function () {
|
|
@@ -46759,6 +47233,7 @@ function jsExtras(Prism) {
|
|
|
46759
47233
|
flags
|
|
46760
47234
|
)
|
|
46761
47235
|
}
|
|
47236
|
+
|
|
46762
47237
|
Prism.languages.insertBefore('javascript', 'keyword', {
|
|
46763
47238
|
imports: {
|
|
46764
47239
|
// https://tc39.es/ecma262/#sec-imports
|
|
@@ -46828,6 +47303,7 @@ function jsExtras(Prism) {
|
|
|
46828
47303
|
alias: 'class-name'
|
|
46829
47304
|
}
|
|
46830
47305
|
}) // add 'maybe-class-name' to tokens which might be a class name
|
|
47306
|
+
|
|
46831
47307
|
var maybeClassNameTokens = [
|
|
46832
47308
|
'function',
|
|
46833
47309
|
'function-variable',
|
|
@@ -46835,14 +47311,17 @@ function jsExtras(Prism) {
|
|
|
46835
47311
|
'method-variable',
|
|
46836
47312
|
'property-access'
|
|
46837
47313
|
]
|
|
47314
|
+
|
|
46838
47315
|
for (var i = 0; i < maybeClassNameTokens.length; i++) {
|
|
46839
47316
|
var token = maybeClassNameTokens[i]
|
|
46840
47317
|
var value = Prism.languages.javascript[token] // convert regex to object
|
|
47318
|
+
|
|
46841
47319
|
if (Prism.util.type(value) === 'RegExp') {
|
|
46842
47320
|
value = Prism.languages.javascript[token] = {
|
|
46843
47321
|
pattern: value
|
|
46844
47322
|
}
|
|
46845
47323
|
} // keep in mind that we don't support arrays
|
|
47324
|
+
|
|
46846
47325
|
var inside = value.inside || {}
|
|
46847
47326
|
value.inside = inside
|
|
46848
47327
|
inside['maybe-class-name'] = /^[A-Z][\s\S]*/
|
|
@@ -47138,9 +47617,11 @@ function kumir(Prism) {
|
|
|
47138
47617
|
* @param {string} [flags] The regular expression flags.
|
|
47139
47618
|
* @returns {RegExp} A wrapped regular expression for identifiers.
|
|
47140
47619
|
*/
|
|
47620
|
+
|
|
47141
47621
|
function wrapId(pattern, flags) {
|
|
47142
47622
|
return RegExp(pattern.replace(/<nonId>/g, nonId), flags)
|
|
47143
47623
|
}
|
|
47624
|
+
|
|
47144
47625
|
Prism.languages.kumir = {
|
|
47145
47626
|
comment: {
|
|
47146
47627
|
pattern: /\|.*/
|
|
@@ -47184,6 +47665,7 @@ function kumir(Prism) {
|
|
|
47184
47665
|
alias: 'important'
|
|
47185
47666
|
}
|
|
47186
47667
|
],
|
|
47668
|
+
|
|
47187
47669
|
/**
|
|
47188
47670
|
* Should be performed after searching for type names because of "таб".
|
|
47189
47671
|
* "таб" is a reserved word, but never used without a preceding type name.
|
|
@@ -47196,6 +47678,7 @@ function kumir(Prism) {
|
|
|
47196
47678
|
),
|
|
47197
47679
|
lookbehind: true
|
|
47198
47680
|
},
|
|
47681
|
+
|
|
47199
47682
|
/** Should be performed after searching for reserved words. */
|
|
47200
47683
|
name: {
|
|
47201
47684
|
// eslint-disable-next-line regexp/no-super-linear-backtracking
|
|
@@ -47205,6 +47688,7 @@ function kumir(Prism) {
|
|
|
47205
47688
|
),
|
|
47206
47689
|
lookbehind: true
|
|
47207
47690
|
},
|
|
47691
|
+
|
|
47208
47692
|
/** Should be performed after searching for names. */
|
|
47209
47693
|
number: {
|
|
47210
47694
|
pattern: wrapId(
|
|
@@ -47214,8 +47698,10 @@ function kumir(Prism) {
|
|
|
47214
47698
|
),
|
|
47215
47699
|
lookbehind: true
|
|
47216
47700
|
},
|
|
47701
|
+
|
|
47217
47702
|
/** Should be performed after searching for words. */
|
|
47218
47703
|
punctuation: /:=|[(),:;\[\]]/,
|
|
47704
|
+
|
|
47219
47705
|
/**
|
|
47220
47706
|
* Should be performed after searching for
|
|
47221
47707
|
* - numeric constants (because of "+" and "-");
|
|
@@ -47306,6 +47792,7 @@ function latex(Prism) {
|
|
|
47306
47792
|
/(\\begin\{((?:lstlisting|verbatim)\*?)\})[\s\S]*?(?=\\end\{\2\})/,
|
|
47307
47793
|
lookbehind: true
|
|
47308
47794
|
},
|
|
47795
|
+
|
|
47309
47796
|
/*
|
|
47310
47797
|
* equations can be between $$ $$ or $ $ or \( \) or \[ \]
|
|
47311
47798
|
* (all are multiline)
|
|
@@ -47325,6 +47812,7 @@ function latex(Prism) {
|
|
|
47325
47812
|
alias: 'string'
|
|
47326
47813
|
}
|
|
47327
47814
|
],
|
|
47815
|
+
|
|
47328
47816
|
/*
|
|
47329
47817
|
* arguments which are keywords or references are highlighted
|
|
47330
47818
|
* as keywords
|
|
@@ -47338,6 +47826,7 @@ function latex(Prism) {
|
|
|
47338
47826
|
pattern: /(\\url\{)[^}]+(?=\})/,
|
|
47339
47827
|
lookbehind: true
|
|
47340
47828
|
},
|
|
47829
|
+
|
|
47341
47830
|
/*
|
|
47342
47831
|
* section or chapter headlines are highlighted as bold so that
|
|
47343
47832
|
* they stand out more
|
|
@@ -47428,6 +47917,7 @@ function latte(Prism) {
|
|
|
47428
47917
|
if (env.language !== 'latte') {
|
|
47429
47918
|
return
|
|
47430
47919
|
}
|
|
47920
|
+
|
|
47431
47921
|
var lattePattern =
|
|
47432
47922
|
/\{\*[\s\S]*?\*\}|\{[^'"\s{}*](?:[^"'/{}]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|\/\*(?:[^*]|\*(?!\/))*\*\/)*\}/g
|
|
47433
47923
|
Prism.languages['markup-templating'].buildPlaceholders(
|
|
@@ -47572,12 +48062,14 @@ function scheme(Prism) {
|
|
|
47572
48062
|
* @param {Record<string, string>} grammar
|
|
47573
48063
|
* @returns {string}
|
|
47574
48064
|
*/
|
|
48065
|
+
|
|
47575
48066
|
function SortedBNF(grammar) {
|
|
47576
48067
|
for (var key in grammar) {
|
|
47577
48068
|
grammar[key] = grammar[key].replace(/<[\w\s]+>/g, function (key) {
|
|
47578
48069
|
return '(?:' + grammar[key].trim() + ')'
|
|
47579
48070
|
})
|
|
47580
48071
|
} // return the last item
|
|
48072
|
+
|
|
47581
48073
|
return grammar[key]
|
|
47582
48074
|
}
|
|
47583
48075
|
})(Prism)
|
|
@@ -47597,12 +48089,15 @@ function lilypond(Prism) {
|
|
|
47597
48089
|
/\((?:[^();"#\\]|\\[\s\S]|;.*(?!.)|"(?:[^"\\]|\\.)*"|#(?:\{(?:(?!#\})[\s\S])*#\}|[^{])|<expr>)*\)/
|
|
47598
48090
|
.source // allow for up to pow(2, recursivenessLog2) many levels of recursive brace expressions
|
|
47599
48091
|
// For some reason, this can't be 4
|
|
48092
|
+
|
|
47600
48093
|
var recursivenessLog2 = 5
|
|
48094
|
+
|
|
47601
48095
|
for (var i = 0; i < recursivenessLog2; i++) {
|
|
47602
48096
|
schemeExpression = schemeExpression.replace(/<expr>/g, function () {
|
|
47603
48097
|
return schemeExpression
|
|
47604
48098
|
})
|
|
47605
48099
|
}
|
|
48100
|
+
|
|
47606
48101
|
schemeExpression = schemeExpression.replace(/<expr>/g, /[^\s\S]/.source)
|
|
47607
48102
|
var lilypond = (Prism.languages.lilypond = {
|
|
47608
48103
|
comment: /%(?:(?!\{).*|\{[\s\S]*?%\})/,
|
|
@@ -47733,8 +48228,10 @@ function liquid(Prism) {
|
|
|
47733
48228
|
liquidPattern,
|
|
47734
48229
|
function (match) {
|
|
47735
48230
|
var tagMatch = /^\{%-?\s*(\w+)/.exec(match)
|
|
48231
|
+
|
|
47736
48232
|
if (tagMatch) {
|
|
47737
48233
|
var tag = tagMatch[1]
|
|
48234
|
+
|
|
47738
48235
|
if (tag === 'raw' && !insideRaw) {
|
|
47739
48236
|
insideRaw = true
|
|
47740
48237
|
return true
|
|
@@ -47743,6 +48240,7 @@ function liquid(Prism) {
|
|
|
47743
48240
|
return true
|
|
47744
48241
|
}
|
|
47745
48242
|
}
|
|
48243
|
+
|
|
47746
48244
|
return !insideRaw
|
|
47747
48245
|
}
|
|
47748
48246
|
)
|
|
@@ -47776,6 +48274,7 @@ function lisp(Prism) {
|
|
|
47776
48274
|
* @param {string} pattern
|
|
47777
48275
|
* @returns {RegExp}
|
|
47778
48276
|
*/
|
|
48277
|
+
|
|
47779
48278
|
function primitive(pattern) {
|
|
47780
48279
|
return RegExp(
|
|
47781
48280
|
/([\s([])/.source + '(?:' + pattern + ')' + /(?=[\s)])/.source
|
|
@@ -47783,10 +48282,14 @@ function lisp(Prism) {
|
|
|
47783
48282
|
} // Patterns in regular expressions
|
|
47784
48283
|
// Symbol name. See https://www.gnu.org/software/emacs/manual/html_node/elisp/Symbol-Type.html
|
|
47785
48284
|
// & and : are excluded as they are usually used for special purposes
|
|
48285
|
+
|
|
47786
48286
|
var symbol = /(?!\d)[-+*/~!@$%^=<>{}\w]+/.source // symbol starting with & used in function arguments
|
|
48287
|
+
|
|
47787
48288
|
var marker = '&' + symbol // Open parenthesis for look-behind
|
|
48289
|
+
|
|
47788
48290
|
var par = '(\\()'
|
|
47789
48291
|
var endpar = '(?=\\))' // End the pattern with look-ahead space
|
|
48292
|
+
|
|
47790
48293
|
var space = '(?=\\s)'
|
|
47791
48294
|
var nestedPar =
|
|
47792
48295
|
/(?:[^()]|\((?:[^()]|\((?:[^()]|\((?:[^()]|\((?:[^()]|\([^()]*\))*\))*\))*\))*\))*/
|
|
@@ -48701,6 +49204,107 @@ function mermaid(Prism) {
|
|
|
48701
49204
|
}
|
|
48702
49205
|
}
|
|
48703
49206
|
|
|
49207
|
+
;// CONCATENATED MODULE: ../node_modules/refractor/lang/metafont.js
|
|
49208
|
+
// @ts-nocheck
|
|
49209
|
+
metafont.displayName = 'metafont'
|
|
49210
|
+
metafont.aliases = []
|
|
49211
|
+
|
|
49212
|
+
/** @type {import('../core.js').Syntax} */
|
|
49213
|
+
function metafont(Prism) {
|
|
49214
|
+
Prism.languages.metafont = {
|
|
49215
|
+
// Syntax of METAFONT with the added (public) elements of PlainMETAFONT. Except for internal quantities they are expected to be rarely redefined. Freely inspired by the syntax of Christophe Grandsire for the Crimson Editor.
|
|
49216
|
+
comment: {
|
|
49217
|
+
pattern: /%.*/,
|
|
49218
|
+
greedy: true
|
|
49219
|
+
},
|
|
49220
|
+
string: {
|
|
49221
|
+
pattern: /"[^\r\n"]*"/,
|
|
49222
|
+
greedy: true
|
|
49223
|
+
},
|
|
49224
|
+
number: /\d*\.?\d+/,
|
|
49225
|
+
boolean: /\b(?:false|true)\b/,
|
|
49226
|
+
punctuation: [
|
|
49227
|
+
/[,;()]/,
|
|
49228
|
+
{
|
|
49229
|
+
pattern: /(^|[^{}])(?:\{|\})(?![{}])/,
|
|
49230
|
+
lookbehind: true
|
|
49231
|
+
},
|
|
49232
|
+
{
|
|
49233
|
+
pattern: /(^|[^[])\[(?!\[)/,
|
|
49234
|
+
lookbehind: true
|
|
49235
|
+
},
|
|
49236
|
+
{
|
|
49237
|
+
pattern: /(^|[^\]])\](?!\])/,
|
|
49238
|
+
lookbehind: true
|
|
49239
|
+
}
|
|
49240
|
+
],
|
|
49241
|
+
constant: [
|
|
49242
|
+
{
|
|
49243
|
+
pattern: /(^|[^!?])\?\?\?(?![!?])/,
|
|
49244
|
+
lookbehind: true
|
|
49245
|
+
},
|
|
49246
|
+
{
|
|
49247
|
+
pattern: /(^|[^/*\\])(?:\\|\\\\)(?![/*\\])/,
|
|
49248
|
+
lookbehind: true
|
|
49249
|
+
},
|
|
49250
|
+
/\b(?:_|blankpicture|bp|cc|cm|dd|ditto|down|eps|epsilon|fullcircle|halfcircle|identity|in|infinity|left|mm|nullpen|nullpicture|origin|pc|penrazor|penspeck|pensquare|penstroke|proof|pt|quartercircle|relax|right|smoke|unitpixel|unitsquare|up)\b/
|
|
49251
|
+
],
|
|
49252
|
+
quantity: {
|
|
49253
|
+
pattern:
|
|
49254
|
+
/\b(?:autorounding|blacker|boundarychar|charcode|chardp|chardx|chardy|charext|charht|charic|charwd|currentwindow|day|designsize|displaying|fillin|fontmaking|granularity|hppp|join_radius|month|o_correction|pausing|pen_(?:bot|lft|rt|top)|pixels_per_inch|proofing|showstopping|smoothing|time|tolerance|tracingcapsules|tracingchoices|tracingcommands|tracingedges|tracingequations|tracingmacros|tracingonline|tracingoutput|tracingpens|tracingrestores|tracingspecs|tracingstats|tracingtitles|turningcheck|vppp|warningcheck|xoffset|year|yoffset)\b/,
|
|
49255
|
+
alias: 'keyword'
|
|
49256
|
+
},
|
|
49257
|
+
command: {
|
|
49258
|
+
pattern:
|
|
49259
|
+
/\b(?:addto|batchmode|charlist|cull|display|errhelp|errmessage|errorstopmode|everyjob|extensible|fontdimen|headerbyte|inner|interim|let|ligtable|message|newinternal|nonstopmode|numspecial|openwindow|outer|randomseed|save|scrollmode|shipout|show|showdependencies|showstats|showtoken|showvariable|special)\b/,
|
|
49260
|
+
alias: 'builtin'
|
|
49261
|
+
},
|
|
49262
|
+
operator: [
|
|
49263
|
+
{
|
|
49264
|
+
pattern:
|
|
49265
|
+
/(^|[^>=<:|])(?:<|<=|=|=:|\|=:|\|=:>|=:\|>|=:\||\|=:\||\|=:\|>|\|=:\|>>|>|>=|:|:=|<>|::|\|\|:)(?![>=<:|])/,
|
|
49266
|
+
lookbehind: true
|
|
49267
|
+
},
|
|
49268
|
+
{
|
|
49269
|
+
pattern: /(^|[^+-])(?:\+|\+\+|-{1,3}|\+-\+)(?![+-])/,
|
|
49270
|
+
lookbehind: true
|
|
49271
|
+
},
|
|
49272
|
+
{
|
|
49273
|
+
pattern: /(^|[^/*\\])(?:\*|\*\*|\/)(?![/*\\])/,
|
|
49274
|
+
lookbehind: true
|
|
49275
|
+
},
|
|
49276
|
+
{
|
|
49277
|
+
pattern: /(^|[^.])(?:\.{2,3})(?!\.)/,
|
|
49278
|
+
lookbehind: true
|
|
49279
|
+
},
|
|
49280
|
+
{
|
|
49281
|
+
pattern: /(^|[^@#&$])&(?![@#&$])/,
|
|
49282
|
+
lookbehind: true
|
|
49283
|
+
},
|
|
49284
|
+
/\b(?:and|not|or)\b/
|
|
49285
|
+
],
|
|
49286
|
+
macro: {
|
|
49287
|
+
pattern:
|
|
49288
|
+
/\b(?:abs|beginchar|bot|byte|capsule_def|ceiling|change_width|clear_pen_memory|clearit|clearpen|clearxy|counterclockwise|cullit|cutdraw|cutoff|decr|define_blacker_pixels|define_corrected_pixels|define_good_x_pixels|define_good_y_pixels|define_horizontal_corrected_pixels|define_pixels|define_whole_blacker_pixels|define_whole_pixels|define_whole_vertical_blacker_pixels|define_whole_vertical_pixels|dir|direction|directionpoint|div|dotprod|downto|draw|drawdot|endchar|erase|fill|filldraw|fix_units|flex|font_coding_scheme|font_extra_space|font_identifier|font_normal_shrink|font_normal_space|font_normal_stretch|font_quad|font_size|font_slant|font_x_height|gfcorners|gobble|gobbled|good\.(?:bot|lft|rt|top|x|y)|grayfont|hide|hround|imagerules|incr|interact|interpath|intersectionpoint|inverse|italcorr|killtext|labelfont|labels|lft|loggingall|lowres_fix|makegrid|makelabel(?:\.(?:bot|lft|rt|top)(?:\.nodot)?)?|max|min|mod|mode_def|mode_setup|nodisplays|notransforms|numtok|openit|penlabels|penpos|pickup|proofoffset|proofrule|proofrulethickness|range|reflectedabout|rotatedabout|rotatedaround|round|rt|savepen|screenchars|screenrule|screenstrokes|shipit|showit|slantfont|softjoin|solve|stop|superellipse|tensepath|thru|titlefont|top|tracingall|tracingnone|undraw|undrawdot|unfill|unfilldraw|upto|vround)\b/,
|
|
49289
|
+
alias: 'function'
|
|
49290
|
+
},
|
|
49291
|
+
builtin:
|
|
49292
|
+
/\b(?:ASCII|angle|char|cosd|decimal|directiontime|floor|hex|intersectiontimes|jobname|known|length|makepath|makepen|mexp|mlog|normaldeviate|oct|odd|pencircle|penoffset|point|postcontrol|precontrol|reverse|rotated|sind|sqrt|str|subpath|substring|totalweight|turningnumber|uniformdeviate|unknown|xpart|xxpart|xypart|ypart|yxpart|yypart)\b/,
|
|
49293
|
+
keyword:
|
|
49294
|
+
/\b(?:also|at|atleast|begingroup|charexists|contour|controls|curl|cycle|def|delimiters|doublepath|dropping|dump|else|elseif|end|enddef|endfor|endgroup|endinput|exitif|exitunless|expandafter|fi|for|forever|forsuffixes|from|if|input|inwindow|keeping|kern|of|primarydef|quote|readstring|scaled|scantokens|secondarydef|shifted|skipto|slanted|step|tension|tertiarydef|to|transformed|until|vardef|withpen|withweight|xscaled|yscaled|zscaled)\b/,
|
|
49295
|
+
type: {
|
|
49296
|
+
pattern:
|
|
49297
|
+
/\b(?:boolean|expr|numeric|pair|path|pen|picture|primary|secondary|string|suffix|tertiary|text|transform)\b/,
|
|
49298
|
+
alias: 'property'
|
|
49299
|
+
},
|
|
49300
|
+
variable: {
|
|
49301
|
+
pattern:
|
|
49302
|
+
/(^|[^@#&$])(?:@#|#@|#|@)(?![@#&$])|\b(?:aspect_ratio|currentpen|currentpicture|currenttransform|d|extra_beginchar|extra_endchar|extra_setup|h|localfont|mag|mode|screen_cols|screen_rows|w|whatever|x|y|z)\b/,
|
|
49303
|
+
lookbehind: true
|
|
49304
|
+
}
|
|
49305
|
+
}
|
|
49306
|
+
}
|
|
49307
|
+
|
|
48704
49308
|
;// CONCATENATED MODULE: ../node_modules/refractor/lang/mizar.js
|
|
48705
49309
|
// @ts-nocheck
|
|
48706
49310
|
mizar.displayName = 'mizar'
|
|
@@ -49303,16 +49907,19 @@ function naniscript(Prism) {
|
|
|
49303
49907
|
}
|
|
49304
49908
|
Prism.languages.nani = Prism.languages['naniscript']
|
|
49305
49909
|
/** @typedef {InstanceType<import("./prism-core")["Token"]>} Token */
|
|
49910
|
+
|
|
49306
49911
|
/**
|
|
49307
49912
|
* This hook is used to validate generic-text tokens for balanced brackets.
|
|
49308
49913
|
* Mark token as bad-line when contains not balanced brackets: {},[]
|
|
49309
49914
|
*/
|
|
49915
|
+
|
|
49310
49916
|
Prism.hooks.add('after-tokenize', function (env) {
|
|
49311
49917
|
/** @type {(Token | string)[]} */
|
|
49312
49918
|
var tokens = env.tokens
|
|
49313
49919
|
tokens.forEach(function (token) {
|
|
49314
49920
|
if (typeof token !== 'string' && token.type === 'generic-text') {
|
|
49315
49921
|
var content = getTextContent(token)
|
|
49922
|
+
|
|
49316
49923
|
if (!isBracketsBalanced(content)) {
|
|
49317
49924
|
token.type = 'bad-line'
|
|
49318
49925
|
token.content = content
|
|
@@ -49324,12 +49931,15 @@ function naniscript(Prism) {
|
|
|
49324
49931
|
* @param {string} input
|
|
49325
49932
|
* @returns {boolean}
|
|
49326
49933
|
*/
|
|
49934
|
+
|
|
49327
49935
|
function isBracketsBalanced(input) {
|
|
49328
49936
|
var brackets = '[]{}'
|
|
49329
49937
|
var stack = []
|
|
49938
|
+
|
|
49330
49939
|
for (var i = 0; i < input.length; i++) {
|
|
49331
49940
|
var bracket = input[i]
|
|
49332
49941
|
var bracketsIndex = brackets.indexOf(bracket)
|
|
49942
|
+
|
|
49333
49943
|
if (bracketsIndex !== -1) {
|
|
49334
49944
|
if (bracketsIndex % 2 === 0) {
|
|
49335
49945
|
stack.push(bracketsIndex + 1)
|
|
@@ -49338,12 +49948,14 @@ function naniscript(Prism) {
|
|
|
49338
49948
|
}
|
|
49339
49949
|
}
|
|
49340
49950
|
}
|
|
49951
|
+
|
|
49341
49952
|
return stack.length === 0
|
|
49342
49953
|
}
|
|
49343
49954
|
/**
|
|
49344
49955
|
* @param {string | Token | (string | Token)[]} token
|
|
49345
49956
|
* @returns {string}
|
|
49346
49957
|
*/
|
|
49958
|
+
|
|
49347
49959
|
function getTextContent(token) {
|
|
49348
49960
|
if (typeof token === 'string') {
|
|
49349
49961
|
return token
|
|
@@ -49770,7 +50382,7 @@ function nsis(Prism) {
|
|
|
49770
50382
|
},
|
|
49771
50383
|
keyword: {
|
|
49772
50384
|
pattern:
|
|
49773
|
-
/(^[\t ]*)(?:Abort|Add(?:BrandingImage|Size)|AdvSplash|Allow(?:RootDirInstall|SkipFiles)|AutoCloseWindow|BG(?:Font|Gradient|Image)|Banner|BrandingText|BringToFront|CRCCheck|Call(?:InstDLL)?|Caption|ChangeUI|CheckBitmap|ClearErrors|CompletedText|ComponentText|CopyFiles|Create(?:Directory|Font|ShortCut)|Delete(?:INISec|INIStr|RegKey|RegValue)?|Detail(?:Print|sButtonText)|Dialer|Dir(?:Text|Var|Verify)|EnableWindow|Enum(?:RegKey|RegValue)|Exch|Exec(?:Shell(?:Wait)?|Wait)?|ExpandEnvStrings|File(?:BufSize|Close|ErrorText|Open|Read|ReadByte|ReadUTF16LE|ReadWord|Seek|Write|WriteByte|WriteUTF16LE|WriteWord)?|Find(?:Close|First|Next|Window)|FlushINI|Get(?:CurInstType|CurrentAddress|DLLVersion(?:Local)?|DlgItem|ErrorLevel|FileTime(?:Local)?|FullPathName|Function(?:Address|End)?|InstDirError|LabelAddress|TempFileName)|Goto|HideWindow|Icon|If(?:Abort|Errors|FileExists|RebootFlag|Silent)|InitPluginsDir|InstProgressFlags|Inst(?:Type(?:GetText|SetText)?)|Install(?:ButtonText|Colors|Dir(?:RegKey)?)|Int(?:64|Ptr)?CmpU?|Int(?:64)?Fmt|Int(?:Ptr)?Op|IsWindow|Lang(?:DLL|String)|License(?:BkColor|Data|ForceSelection|LangString|Text)|LoadLanguageFile|LockWindow|Log(?:Set|Text)|Manifest(?:DPIAware|SupportedOS)|Math|MessageBox|MiscButtonText|NSISdl|Name|Nop|OutFile|PE(?:DllCharacteristics|SubsysVer)|Page(?:Callbacks)?|Pop|Push|Quit|RMDir|Read(?:EnvStr|INIStr|RegDWORD|RegStr)|Reboot|RegDLL|Rename|RequestExecutionLevel|ReserveFile|Return|SearchPath|Section(?:End|GetFlags|GetInstTypes|GetSize|GetText|Group|In|SetFlags|SetInstTypes|SetSize|SetText)?|SendMessage|Set(?:AutoClose|BrandingImage|Compress|Compressor(?:DictSize)?|CtlColors|CurInstType|DatablockOptimize|DateSave|Details(?:Print|View)|ErrorLevel|Errors|FileAttributes|Font|OutPath|Overwrite|PluginUnload|RebootFlag|RegView|ShellVarContext|Silent)|Show(?:InstDetails|UninstDetails|Window)|Silent(?:Install|UnInstall)|Sleep|SpaceTexts|Splash|StartMenu|Str(?:CmpS?|Cpy|Len)|SubCaption|System|UnRegDLL|Unicode|UninstPage|Uninstall(?:ButtonText|Caption|Icon|SubCaption|Text)|UserInfo|VI(?:AddVersionKey|FileVersion|ProductVersion)|VPatch|Var|WindowIcon|Write(?:INIStr|Reg(?:Bin|DWORD|ExpandStr|MultiStr|None|Str)|Uninstaller)|XPStyle|ns(?:Dialogs|Exec))\b/m,
|
|
50385
|
+
/(^[\t ]*)(?:Abort|Add(?:BrandingImage|Size)|AdvSplash|Allow(?:RootDirInstall|SkipFiles)|AutoCloseWindow|BG(?:Font|Gradient|Image)|Banner|BrandingText|BringToFront|CRCCheck|Call(?:InstDLL)?|Caption|ChangeUI|CheckBitmap|ClearErrors|CompletedText|ComponentText|CopyFiles|Create(?:Directory|Font|ShortCut)|Delete(?:INISec|INIStr|RegKey|RegValue)?|Detail(?:Print|sButtonText)|Dialer|Dir(?:Text|Var|Verify)|EnableWindow|Enum(?:RegKey|RegValue)|Exch|Exec(?:Shell(?:Wait)?|Wait)?|ExpandEnvStrings|File(?:BufSize|Close|ErrorText|Open|Read|ReadByte|ReadUTF16LE|ReadWord|Seek|Write|WriteByte|WriteUTF16LE|WriteWord)?|Find(?:Close|First|Next|Window)|FlushINI|Get(?:CurInstType|CurrentAddress|DLLVersion(?:Local)?|DlgItem|ErrorLevel|FileTime(?:Local)?|FullPathName|Function(?:Address|End)?|InstDirError|KnownFolderPath|LabelAddress|TempFileName|WinVer)|Goto|HideWindow|Icon|If(?:Abort|Errors|FileExists|RebootFlag|RtlLanguage|ShellVarContextAll|Silent)|InitPluginsDir|InstProgressFlags|Inst(?:Type(?:GetText|SetText)?)|Install(?:ButtonText|Colors|Dir(?:RegKey)?)|Int(?:64|Ptr)?CmpU?|Int(?:64)?Fmt|Int(?:Ptr)?Op|IsWindow|Lang(?:DLL|String)|License(?:BkColor|Data|ForceSelection|LangString|Text)|LoadLanguageFile|LockWindow|Log(?:Set|Text)|Manifest(?:DPIAware|SupportedOS)|Math|MessageBox|MiscButtonText|NSISdl|Name|Nop|OutFile|PE(?:DllCharacteristics|SubsysVer)|Page(?:Callbacks)?|Pop|Push|Quit|RMDir|Read(?:EnvStr|INIStr|RegDWORD|RegStr)|Reboot|RegDLL|Rename|RequestExecutionLevel|ReserveFile|Return|SearchPath|Section(?:End|GetFlags|GetInstTypes|GetSize|GetText|Group|In|SetFlags|SetInstTypes|SetSize|SetText)?|SendMessage|Set(?:AutoClose|BrandingImage|Compress|Compressor(?:DictSize)?|CtlColors|CurInstType|DatablockOptimize|DateSave|Details(?:Print|View)|ErrorLevel|Errors|FileAttributes|Font|OutPath|Overwrite|PluginUnload|RebootFlag|RegView|ShellVarContext|Silent)|Show(?:InstDetails|UninstDetails|Window)|Silent(?:Install|UnInstall)|Sleep|SpaceTexts|Splash|StartMenu|Str(?:CmpS?|Cpy|Len)|SubCaption|System|Target|UnRegDLL|Unicode|UninstPage|Uninstall(?:ButtonText|Caption|Icon|SubCaption|Text)|UserInfo|VI(?:AddVersionKey|FileVersion|ProductVersion)|VPatch|Var|WindowIcon|Write(?:INIStr|Reg(?:Bin|DWORD|ExpandStr|MultiStr|None|Str)|Uninstaller)|XPStyle|ns(?:Dialogs|Exec))\b/m,
|
|
49774
50386
|
lookbehind: true
|
|
49775
50387
|
},
|
|
49776
50388
|
property:
|
|
@@ -49885,6 +50497,7 @@ function odin(Prism) {
|
|
|
49885
50497
|
greedy: true
|
|
49886
50498
|
}
|
|
49887
50499
|
],
|
|
50500
|
+
|
|
49888
50501
|
/**
|
|
49889
50502
|
* Should be found before strings because of '"'"- and '`'`-like sequences.
|
|
49890
50503
|
*/
|
|
@@ -49924,6 +50537,7 @@ function odin(Prism) {
|
|
|
49924
50537
|
},
|
|
49925
50538
|
keyword:
|
|
49926
50539
|
/\b(?:asm|auto_cast|bit_set|break|case|cast|context|continue|defer|distinct|do|dynamic|else|enum|fallthrough|for|foreign|if|import|in|map|matrix|not_in|or_else|or_return|package|proc|return|struct|switch|transmute|typeid|union|using|when|where)\b/,
|
|
50540
|
+
|
|
49927
50541
|
/**
|
|
49928
50542
|
* false, nil, true can be used as procedure names. "_" and keywords can't.
|
|
49929
50543
|
*/
|
|
@@ -50011,7 +50625,9 @@ function opencl(Prism) {
|
|
|
50011
50625
|
}
|
|
50012
50626
|
}
|
|
50013
50627
|
/* OpenCL host API */
|
|
50628
|
+
|
|
50014
50629
|
Prism.languages.insertBefore('c', 'keyword', attributes) // C++ includes everything from the OpenCL C host API plus the classes defined in cl2.h
|
|
50630
|
+
|
|
50015
50631
|
if (Prism.languages.cpp) {
|
|
50016
50632
|
// Extracted from doxygen class list http://github.khronos.org/OpenCL-CLHPP/annotated.html
|
|
50017
50633
|
attributes['type-opencl-host-cpp'] = {
|
|
@@ -50252,6 +50868,7 @@ pascal.aliases = ['objectpascal']
|
|
|
50252
50868
|
/** @type {import('../core.js').Syntax} */
|
|
50253
50869
|
function pascal(Prism) {
|
|
50254
50870
|
// Based on Free Pascal
|
|
50871
|
+
|
|
50255
50872
|
/* TODO
|
|
50256
50873
|
Support inline asm ?
|
|
50257
50874
|
*/
|
|
@@ -50914,6 +51531,7 @@ function powershell(Prism) {
|
|
|
50914
51531
|
},
|
|
50915
51532
|
punctuation: /[|{}[\];(),.]/
|
|
50916
51533
|
}) // Variable interpolation inside strings, and nested expressions
|
|
51534
|
+
|
|
50917
51535
|
powershell.string[0].inside = {
|
|
50918
51536
|
function: {
|
|
50919
51537
|
// Allow for one level of nesting
|
|
@@ -51008,6 +51626,7 @@ function promql(Prism) {
|
|
|
51008
51626
|
'quantile'
|
|
51009
51627
|
] // PromQL vector matching + the by and without clauses
|
|
51010
51628
|
// (https://prometheus.io/docs/prometheus/latest/querying/operators/#vector-matching)
|
|
51629
|
+
|
|
51011
51630
|
var vectorMatching = [
|
|
51012
51631
|
'on',
|
|
51013
51632
|
'ignoring',
|
|
@@ -51017,6 +51636,7 @@ function promql(Prism) {
|
|
|
51017
51636
|
'without'
|
|
51018
51637
|
] // PromQL offset modifier
|
|
51019
51638
|
// (https://prometheus.io/docs/prometheus/latest/querying/basics/#offset-modifier)
|
|
51639
|
+
|
|
51020
51640
|
var offsetModifier = ['offset']
|
|
51021
51641
|
var keywords = aggregations.concat(vectorMatching, offsetModifier)
|
|
51022
51642
|
Prism.languages.promql = {
|
|
@@ -51176,6 +51796,7 @@ function stylus(Prism) {
|
|
|
51176
51796
|
pattern: /(\b\d+)(?:%|[a-z]+)/,
|
|
51177
51797
|
lookbehind: true
|
|
51178
51798
|
} // 123 -123 .123 -.123 12.3 -12.3
|
|
51799
|
+
|
|
51179
51800
|
var number = {
|
|
51180
51801
|
pattern: /(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,
|
|
51181
51802
|
lookbehind: true
|
|
@@ -51355,6 +51976,7 @@ function twig(Prism) {
|
|
|
51355
51976
|
if (env.language !== 'twig') {
|
|
51356
51977
|
return
|
|
51357
51978
|
}
|
|
51979
|
+
|
|
51358
51980
|
var pattern = /\{(?:#[\s\S]*?#|%[\s\S]*?%|\{[\s\S]*?\})\}/g
|
|
51359
51981
|
Prism.languages['markup-templating'].buildPlaceholders(env, 'twig', pattern)
|
|
51360
51982
|
})
|
|
@@ -51520,6 +52142,7 @@ function pug(Prism) {
|
|
|
51520
52142
|
var filter_pattern =
|
|
51521
52143
|
/(^([\t ]*)):<filter_name>(?:(?:\r?\n|\r(?!\n))(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/
|
|
51522
52144
|
.source // Non exhaustive list of available filters and associated languages
|
|
52145
|
+
|
|
51523
52146
|
var filters = [
|
|
51524
52147
|
{
|
|
51525
52148
|
filter: 'atpl',
|
|
@@ -51541,6 +52164,7 @@ function pug(Prism) {
|
|
|
51541
52164
|
'stylus'
|
|
51542
52165
|
]
|
|
51543
52166
|
var all_filters = {}
|
|
52167
|
+
|
|
51544
52168
|
for (var i = 0, l = filters.length; i < l; i++) {
|
|
51545
52169
|
var filter = filters[i]
|
|
51546
52170
|
filter =
|
|
@@ -51550,6 +52174,7 @@ function pug(Prism) {
|
|
|
51550
52174
|
language: filter
|
|
51551
52175
|
}
|
|
51552
52176
|
: filter
|
|
52177
|
+
|
|
51553
52178
|
if (Prism.languages[filter.language]) {
|
|
51554
52179
|
all_filters['filter-' + filter.filter] = {
|
|
51555
52180
|
pattern: RegExp(
|
|
@@ -51573,6 +52198,7 @@ function pug(Prism) {
|
|
|
51573
52198
|
}
|
|
51574
52199
|
}
|
|
51575
52200
|
}
|
|
52201
|
+
|
|
51576
52202
|
Prism.languages.insertBefore('pug', 'filter', all_filters)
|
|
51577
52203
|
})(Prism)
|
|
51578
52204
|
}
|
|
@@ -51800,10 +52426,12 @@ function pure(Prism) {
|
|
|
51800
52426
|
var inlineLanguageRe = /%< *-\*- *<lang>\d* *-\*-[\s\S]+?%>/.source
|
|
51801
52427
|
inlineLanguages.forEach(function (lang) {
|
|
51802
52428
|
var alias = lang
|
|
52429
|
+
|
|
51803
52430
|
if (typeof lang !== 'string') {
|
|
51804
52431
|
alias = lang.alias
|
|
51805
52432
|
lang = lang.lang
|
|
51806
52433
|
}
|
|
52434
|
+
|
|
51807
52435
|
if (Prism.languages[alias]) {
|
|
51808
52436
|
var o = {}
|
|
51809
52437
|
o['inline-lang-' + alias] = {
|
|
@@ -51822,6 +52450,7 @@ function pure(Prism) {
|
|
|
51822
52450
|
Prism.languages.insertBefore('pure', 'inline-lang', o)
|
|
51823
52451
|
}
|
|
51824
52452
|
}) // C is the default inline language
|
|
52453
|
+
|
|
51825
52454
|
if (Prism.languages.c) {
|
|
51826
52455
|
Prism.languages.pure['inline-lang'].inside.rest = Prism.util.clone(
|
|
51827
52456
|
Prism.languages.c
|
|
@@ -51980,6 +52609,7 @@ function qsharp(Prism) {
|
|
|
51980
52609
|
* @param {string} [flags]
|
|
51981
52610
|
* @returns {RegExp}
|
|
51982
52611
|
*/
|
|
52612
|
+
|
|
51983
52613
|
function re(pattern, replacements, flags) {
|
|
51984
52614
|
return RegExp(replace(pattern, replacements), flags || '')
|
|
51985
52615
|
}
|
|
@@ -51990,15 +52620,18 @@ function qsharp(Prism) {
|
|
|
51990
52620
|
* @param {number} depthLog2
|
|
51991
52621
|
* @returns {string}
|
|
51992
52622
|
*/
|
|
52623
|
+
|
|
51993
52624
|
function nested(pattern, depthLog2) {
|
|
51994
52625
|
for (var i = 0; i < depthLog2; i++) {
|
|
51995
52626
|
pattern = pattern.replace(/<<self>>/g, function () {
|
|
51996
52627
|
return '(?:' + pattern + ')'
|
|
51997
52628
|
})
|
|
51998
52629
|
}
|
|
52630
|
+
|
|
51999
52631
|
return pattern.replace(/<<self>>/g, '[^\\s\\S]')
|
|
52000
52632
|
} // https://docs.microsoft.com/en-us/azure/quantum/user-guide/language/typesystem/
|
|
52001
52633
|
// https://github.com/microsoft/qsharp-language/tree/main/Specifications/Language/5_Grammar
|
|
52634
|
+
|
|
52002
52635
|
var keywordKinds = {
|
|
52003
52636
|
// keywords which represent a return or variable type
|
|
52004
52637
|
type: 'Adj BigInt Bool Ctl Double false Int One Pauli PauliI PauliX PauliY PauliZ Qubit Range Result String true Unit Zero',
|
|
@@ -52006,18 +52639,22 @@ function qsharp(Prism) {
|
|
|
52006
52639
|
other:
|
|
52007
52640
|
'Adjoint adjoint apply as auto body borrow borrowing Controlled controlled distribute elif else fail fixup for function if in internal intrinsic invert is let mutable namespace new newtype open operation repeat return self set until use using while within'
|
|
52008
52641
|
} // keywords
|
|
52642
|
+
|
|
52009
52643
|
function keywordsToPattern(words) {
|
|
52010
52644
|
return '\\b(?:' + words.trim().replace(/ /g, '|') + ')\\b'
|
|
52011
52645
|
}
|
|
52646
|
+
|
|
52012
52647
|
var keywords = RegExp(
|
|
52013
52648
|
keywordsToPattern(keywordKinds.type + ' ' + keywordKinds.other)
|
|
52014
52649
|
) // types
|
|
52650
|
+
|
|
52015
52651
|
var identifier = /\b[A-Za-z_]\w*\b/.source
|
|
52016
52652
|
var qualifiedName = replace(/<<0>>(?:\s*\.\s*<<0>>)*/.source, [identifier])
|
|
52017
52653
|
var typeInside = {
|
|
52018
52654
|
keyword: keywords,
|
|
52019
52655
|
punctuation: /[<>()?,.:[\]]/
|
|
52020
52656
|
} // strings
|
|
52657
|
+
|
|
52021
52658
|
var regularString = /"(?:\\.|[^\\"])*"/.source
|
|
52022
52659
|
Prism.languages.qsharp = Prism.languages.extend('clike', {
|
|
52023
52660
|
comment: /\/\/.*/,
|
|
@@ -52058,6 +52695,7 @@ function qsharp(Prism) {
|
|
|
52058
52695
|
alias: 'operator'
|
|
52059
52696
|
}
|
|
52060
52697
|
}) // single line
|
|
52698
|
+
|
|
52061
52699
|
var interpolationExpr = nested(
|
|
52062
52700
|
replace(/\{(?:[^"{}]|<<0>>|<<self>>)*\}/.source, [regularString]),
|
|
52063
52701
|
2
|
|
@@ -52086,6 +52724,7 @@ function qsharp(Prism) {
|
|
|
52086
52724
|
}
|
|
52087
52725
|
})
|
|
52088
52726
|
})(Prism)
|
|
52727
|
+
|
|
52089
52728
|
Prism.languages.qs = Prism.languages.qsharp
|
|
52090
52729
|
}
|
|
52091
52730
|
|
|
@@ -52170,11 +52809,13 @@ function qml(Prism) {
|
|
|
52170
52809
|
.replace(/<comment>/g, function () {
|
|
52171
52810
|
return jsComment
|
|
52172
52811
|
}) // the pattern will blow up, so only a few iterations
|
|
52812
|
+
|
|
52173
52813
|
for (var i = 0; i < 2; i++) {
|
|
52174
52814
|
jsExpr = jsExpr.replace(/<expr>/g, function () {
|
|
52175
52815
|
return jsExpr
|
|
52176
52816
|
})
|
|
52177
52817
|
}
|
|
52818
|
+
|
|
52178
52819
|
jsExpr = jsExpr.replace(/<expr>/g, '[^\\s\\S]')
|
|
52179
52820
|
Prism.languages.qml = {
|
|
52180
52821
|
comment: {
|
|
@@ -52329,17 +52970,20 @@ function cshtml(Prism) {
|
|
|
52329
52970
|
* @param {number} depthLog2
|
|
52330
52971
|
* @returns {string}
|
|
52331
52972
|
*/
|
|
52973
|
+
|
|
52332
52974
|
function nested(pattern, depthLog2) {
|
|
52333
52975
|
for (var i = 0; i < depthLog2; i++) {
|
|
52334
52976
|
pattern = pattern.replace(/<self>/g, function () {
|
|
52335
52977
|
return '(?:' + pattern + ')'
|
|
52336
52978
|
})
|
|
52337
52979
|
}
|
|
52980
|
+
|
|
52338
52981
|
return pattern
|
|
52339
52982
|
.replace(/<self>/g, '[^\\s\\S]')
|
|
52340
52983
|
.replace(/<str>/g, '(?:' + stringLike + ')')
|
|
52341
52984
|
.replace(/<comment>/g, '(?:' + commentLike + ')')
|
|
52342
52985
|
}
|
|
52986
|
+
|
|
52343
52987
|
var round = nested(/\((?:[^()'"@/]|<str>|<comment>|<self>)*\)/.source, 2)
|
|
52344
52988
|
var square = nested(/\[(?:[^\[\]'"@/]|<str>|<comment>|<self>)*\]/.source, 1)
|
|
52345
52989
|
var curly = nested(/\{(?:[^{}'"@/]|<str>|<comment>|<self>)*\}/.source, 2)
|
|
@@ -52373,6 +53017,7 @@ function cshtml(Prism) {
|
|
|
52373
53017
|
//
|
|
52374
53018
|
// To somewhat alleviate the problem a bit, the patterns for characters (e.g. 'a') is very permissive, it also
|
|
52375
53019
|
// allows invalid characters to support HTML expressions like this: <p>That's it!</p>.
|
|
53020
|
+
|
|
52376
53021
|
var tagAttrInlineCs = /@(?![\w()])/.source + '|' + inlineCs
|
|
52377
53022
|
var tagAttrValue =
|
|
52378
53023
|
'(?:' +
|
|
@@ -52431,6 +53076,7 @@ function cshtml(Prism) {
|
|
|
52431
53076
|
//
|
|
52432
53077
|
// In the below code, both CSHTML and C#+HTML will be create as separate language definitions that reference each
|
|
52433
53078
|
// other. However, only CSHTML will be exported via `Prism.languages`.
|
|
53079
|
+
|
|
52434
53080
|
Prism.languages.cshtml = Prism.languages.extend('markup', {})
|
|
52435
53081
|
var csharpWithHtml = Prism.languages.insertBefore(
|
|
52436
53082
|
'csharp',
|
|
@@ -52569,6 +53215,7 @@ function jsx(Prism) {
|
|
|
52569
53215
|
* @param {string} source
|
|
52570
53216
|
* @param {string} [flags]
|
|
52571
53217
|
*/
|
|
53218
|
+
|
|
52572
53219
|
function re(source, flags) {
|
|
52573
53220
|
source = source
|
|
52574
53221
|
.replace(/<S>/g, function () {
|
|
@@ -52582,6 +53229,7 @@ function jsx(Prism) {
|
|
|
52582
53229
|
})
|
|
52583
53230
|
return RegExp(source, flags)
|
|
52584
53231
|
}
|
|
53232
|
+
|
|
52585
53233
|
spread = re(spread).source
|
|
52586
53234
|
Prism.languages.jsx = Prism.languages.extend('markup', javascript)
|
|
52587
53235
|
Prism.languages.jsx.tag.pattern = re(
|
|
@@ -52624,23 +53272,30 @@ function jsx(Prism) {
|
|
|
52624
53272
|
},
|
|
52625
53273
|
Prism.languages.jsx.tag
|
|
52626
53274
|
) // The following will handle plain text inside tags
|
|
53275
|
+
|
|
52627
53276
|
var stringifyToken = function (token) {
|
|
52628
53277
|
if (!token) {
|
|
52629
53278
|
return ''
|
|
52630
53279
|
}
|
|
53280
|
+
|
|
52631
53281
|
if (typeof token === 'string') {
|
|
52632
53282
|
return token
|
|
52633
53283
|
}
|
|
53284
|
+
|
|
52634
53285
|
if (typeof token.content === 'string') {
|
|
52635
53286
|
return token.content
|
|
52636
53287
|
}
|
|
53288
|
+
|
|
52637
53289
|
return token.content.map(stringifyToken).join('')
|
|
52638
53290
|
}
|
|
53291
|
+
|
|
52639
53292
|
var walkTokens = function (tokens) {
|
|
52640
53293
|
var openedTags = []
|
|
53294
|
+
|
|
52641
53295
|
for (var i = 0; i < tokens.length; i++) {
|
|
52642
53296
|
var token = tokens[i]
|
|
52643
53297
|
var notTagNorBrace = false
|
|
53298
|
+
|
|
52644
53299
|
if (typeof token !== 'string') {
|
|
52645
53300
|
if (
|
|
52646
53301
|
token.type === 'tag' &&
|
|
@@ -52688,6 +53343,7 @@ function jsx(Prism) {
|
|
|
52688
53343
|
notTagNorBrace = true
|
|
52689
53344
|
}
|
|
52690
53345
|
}
|
|
53346
|
+
|
|
52691
53347
|
if (notTagNorBrace || typeof token === 'string') {
|
|
52692
53348
|
if (
|
|
52693
53349
|
openedTags.length > 0 &&
|
|
@@ -52696,6 +53352,7 @@ function jsx(Prism) {
|
|
|
52696
53352
|
// Here we are inside a tag, and not inside a JSX context.
|
|
52697
53353
|
// That's plain text: drop any tokens matched.
|
|
52698
53354
|
var plainText = stringifyToken(token) // And merge text with adjacent text
|
|
53355
|
+
|
|
52699
53356
|
if (
|
|
52700
53357
|
i < tokens.length - 1 &&
|
|
52701
53358
|
(typeof tokens[i + 1] === 'string' ||
|
|
@@ -52704,6 +53361,7 @@ function jsx(Prism) {
|
|
|
52704
53361
|
plainText += stringifyToken(tokens[i + 1])
|
|
52705
53362
|
tokens.splice(i + 1, 1)
|
|
52706
53363
|
}
|
|
53364
|
+
|
|
52707
53365
|
if (
|
|
52708
53366
|
i > 0 &&
|
|
52709
53367
|
(typeof tokens[i - 1] === 'string' ||
|
|
@@ -52713,6 +53371,7 @@ function jsx(Prism) {
|
|
|
52713
53371
|
tokens.splice(i - 1, 1)
|
|
52714
53372
|
i--
|
|
52715
53373
|
}
|
|
53374
|
+
|
|
52716
53375
|
tokens[i] = new Prism.Token(
|
|
52717
53376
|
'plain-text',
|
|
52718
53377
|
plainText,
|
|
@@ -52721,15 +53380,18 @@ function jsx(Prism) {
|
|
|
52721
53380
|
)
|
|
52722
53381
|
}
|
|
52723
53382
|
}
|
|
53383
|
+
|
|
52724
53384
|
if (token.content && typeof token.content !== 'string') {
|
|
52725
53385
|
walkTokens(token.content)
|
|
52726
53386
|
}
|
|
52727
53387
|
}
|
|
52728
53388
|
}
|
|
53389
|
+
|
|
52729
53390
|
Prism.hooks.add('after-tokenize', function (env) {
|
|
52730
53391
|
if (env.language !== 'jsx' && env.language !== 'tsx') {
|
|
52731
53392
|
return
|
|
52732
53393
|
}
|
|
53394
|
+
|
|
52733
53395
|
walkTokens(env.tokens)
|
|
52734
53396
|
})
|
|
52735
53397
|
})(Prism)
|
|
@@ -52749,10 +53411,12 @@ function tsx(Prism) {
|
|
|
52749
53411
|
;(function (Prism) {
|
|
52750
53412
|
var typescript = Prism.util.clone(Prism.languages.typescript)
|
|
52751
53413
|
Prism.languages.tsx = Prism.languages.extend('jsx', typescript) // doesn't work with TS because TS is too complex
|
|
53414
|
+
|
|
52752
53415
|
delete Prism.languages.tsx['parameter']
|
|
52753
53416
|
delete Prism.languages.tsx['literal-property'] // This will prevent collisions between TSX tags and TS generic types.
|
|
52754
53417
|
// Idea by https://github.com/karlhorky
|
|
52755
53418
|
// Discussion: https://github.com/PrismJS/prism/issues/2594#issuecomment-710666928
|
|
53419
|
+
|
|
52756
53420
|
var tag = Prism.languages.tsx.tag
|
|
52757
53421
|
tag.pattern = RegExp(
|
|
52758
53422
|
/(^|[^\w$]|(?=<\/))/.source + '(?:' + tag.pattern.source + ')',
|
|
@@ -52795,6 +53459,7 @@ function reason(Prism) {
|
|
|
52795
53459
|
alias: 'symbol'
|
|
52796
53460
|
}
|
|
52797
53461
|
}) // We can't match functions property, so let's not even try.
|
|
53462
|
+
|
|
52798
53463
|
delete Prism.languages.reason.function
|
|
52799
53464
|
}
|
|
52800
53465
|
|
|
@@ -53258,15 +53923,18 @@ function robotframework(Prism) {
|
|
|
53258
53923
|
punctuation: /^[$@&%]\{|\}$/
|
|
53259
53924
|
}
|
|
53260
53925
|
}
|
|
53926
|
+
|
|
53261
53927
|
function createSection(name, inside) {
|
|
53262
53928
|
var extendecInside = {}
|
|
53263
53929
|
extendecInside['section-header'] = {
|
|
53264
53930
|
pattern: /^ ?\*{3}.+?\*{3}/,
|
|
53265
53931
|
alias: 'keyword'
|
|
53266
53932
|
} // copy inside tokens
|
|
53933
|
+
|
|
53267
53934
|
for (var token in inside) {
|
|
53268
53935
|
extendecInside[token] = inside[token]
|
|
53269
53936
|
}
|
|
53937
|
+
|
|
53270
53938
|
extendecInside['tag'] = {
|
|
53271
53939
|
pattern: /([\r\n](?: {2}|\t)[ \t]*)\[[-\w]+\]/,
|
|
53272
53940
|
lookbehind: true,
|
|
@@ -53290,6 +53958,7 @@ function robotframework(Prism) {
|
|
|
53290
53958
|
inside: extendecInside
|
|
53291
53959
|
}
|
|
53292
53960
|
}
|
|
53961
|
+
|
|
53293
53962
|
var docTag = {
|
|
53294
53963
|
pattern:
|
|
53295
53964
|
/(\[Documentation\](?: {2}|\t)[ \t]*)(?![ \t]|#)(?:.|(?:\r\n?|\n)[ \t]*\.{3})+/,
|
|
@@ -53632,6 +54301,7 @@ function sas(Prism) {
|
|
|
53632
54301
|
lookbehind: true,
|
|
53633
54302
|
inside: args
|
|
53634
54303
|
},
|
|
54304
|
+
|
|
53635
54305
|
/*Special keywords within macros*/
|
|
53636
54306
|
'macro-keyword': macroKeyword,
|
|
53637
54307
|
'macro-variable': macroVariable,
|
|
@@ -53664,6 +54334,7 @@ function sas(Prism) {
|
|
|
53664
54334
|
keyword: /%mend/i
|
|
53665
54335
|
}
|
|
53666
54336
|
},
|
|
54337
|
+
|
|
53667
54338
|
/*%_zscore(headcir, _lhc, _mhc, _shc, headcz, headcpct, _Fheadcz); */
|
|
53668
54339
|
macro: {
|
|
53669
54340
|
pattern: /%_\w+(?=\()/,
|
|
@@ -54039,6 +54710,7 @@ function smarty(Prism) {
|
|
|
54039
54710
|
),
|
|
54040
54711
|
'g'
|
|
54041
54712
|
) // Tokenize all inline Smarty expressions
|
|
54713
|
+
|
|
54042
54714
|
Prism.hooks.add('before-tokenize', function (env) {
|
|
54043
54715
|
var smartyLiteralStart = '{literal}'
|
|
54044
54716
|
var smartyLiteralEnd = '{/literal}'
|
|
@@ -54052,16 +54724,20 @@ function smarty(Prism) {
|
|
|
54052
54724
|
if (match === smartyLiteralEnd) {
|
|
54053
54725
|
smartyLiteralMode = false
|
|
54054
54726
|
}
|
|
54727
|
+
|
|
54055
54728
|
if (!smartyLiteralMode) {
|
|
54056
54729
|
if (match === smartyLiteralStart) {
|
|
54057
54730
|
smartyLiteralMode = true
|
|
54058
54731
|
}
|
|
54732
|
+
|
|
54059
54733
|
return true
|
|
54060
54734
|
}
|
|
54735
|
+
|
|
54061
54736
|
return false
|
|
54062
54737
|
}
|
|
54063
54738
|
)
|
|
54064
54739
|
}) // Re-insert the tokens after tokenizing
|
|
54740
|
+
|
|
54065
54741
|
Prism.hooks.add('after-tokenize', function (env) {
|
|
54066
54742
|
Prism.languages['markup-templating'].tokenizePlaceholders(env, 'smarty')
|
|
54067
54743
|
})
|
|
@@ -54311,6 +54987,7 @@ function soy(Prism) {
|
|
|
54311
54987
|
operator: /\?:?|<=?|>=?|==?|!=|[+*/%-]|\b(?:and|not|or)\b/,
|
|
54312
54988
|
punctuation: /[{}()\[\]|.,:]/
|
|
54313
54989
|
} // Tokenize all inline Soy expressions
|
|
54990
|
+
|
|
54314
54991
|
Prism.hooks.add('before-tokenize', function (env) {
|
|
54315
54992
|
var soyPattern = /\{\{.+?\}\}|\{.+?\}|\s\/\/.*|\/\*[\s\S]*?\*\//g
|
|
54316
54993
|
var soyLitteralStart = '{literal}'
|
|
@@ -54325,16 +55002,20 @@ function soy(Prism) {
|
|
|
54325
55002
|
if (match === soyLitteralEnd) {
|
|
54326
55003
|
soyLitteralMode = false
|
|
54327
55004
|
}
|
|
55005
|
+
|
|
54328
55006
|
if (!soyLitteralMode) {
|
|
54329
55007
|
if (match === soyLitteralStart) {
|
|
54330
55008
|
soyLitteralMode = true
|
|
54331
55009
|
}
|
|
55010
|
+
|
|
54332
55011
|
return true
|
|
54333
55012
|
}
|
|
55013
|
+
|
|
54334
55014
|
return false
|
|
54335
55015
|
}
|
|
54336
55016
|
)
|
|
54337
55017
|
}) // Re-insert the tokens after tokenizing
|
|
55018
|
+
|
|
54338
55019
|
Prism.hooks.add('after-tokenize', function (env) {
|
|
54339
55020
|
Prism.languages['markup-templating'].tokenizePlaceholders(env, 'soy')
|
|
54340
55021
|
})
|
|
@@ -54911,6 +55592,7 @@ function t4Templating(Prism) {
|
|
|
54911
55592
|
}
|
|
54912
55593
|
}
|
|
54913
55594
|
}
|
|
55595
|
+
|
|
54914
55596
|
function createT4(insideLang) {
|
|
54915
55597
|
var grammar = Prism.languages[insideLang]
|
|
54916
55598
|
var className = 'language-' + insideLang
|
|
@@ -54935,6 +55617,7 @@ function t4Templating(Prism) {
|
|
|
54935
55617
|
}
|
|
54936
55618
|
}
|
|
54937
55619
|
}
|
|
55620
|
+
|
|
54938
55621
|
Prism.languages['t4-templating'] = Object.defineProperty({}, 'createT4', {
|
|
54939
55622
|
value: createT4
|
|
54940
55623
|
})
|
|
@@ -55107,6 +55790,7 @@ function tt2(Prism) {
|
|
|
55107
55790
|
}
|
|
55108
55791
|
}
|
|
55109
55792
|
}) // The different types of TT2 strings "replace" the C-like standard string
|
|
55793
|
+
|
|
55110
55794
|
delete Prism.languages.tt2.string
|
|
55111
55795
|
Prism.hooks.add('before-tokenize', function (env) {
|
|
55112
55796
|
var tt2Pattern = /\[%[\s\S]+?%\]/g
|
|
@@ -55134,11 +55818,13 @@ function toml(Prism) {
|
|
|
55134
55818
|
/**
|
|
55135
55819
|
* @param {string} pattern
|
|
55136
55820
|
*/
|
|
55821
|
+
|
|
55137
55822
|
function insertKey(pattern) {
|
|
55138
55823
|
return pattern.replace(/__/g, function () {
|
|
55139
55824
|
return key
|
|
55140
55825
|
})
|
|
55141
55826
|
}
|
|
55827
|
+
|
|
55142
55828
|
Prism.languages.toml = {
|
|
55143
55829
|
comment: {
|
|
55144
55830
|
pattern: /#.*/,
|
|
@@ -56073,15 +56759,128 @@ function webIdl(Prism) {
|
|
|
56073
56759
|
operator: /\.{3}|[=:?<>-]/,
|
|
56074
56760
|
punctuation: /[(){}[\].,;]/
|
|
56075
56761
|
}
|
|
56762
|
+
|
|
56076
56763
|
for (var key in Prism.languages['web-idl']) {
|
|
56077
56764
|
if (key !== 'class-name') {
|
|
56078
56765
|
typeInside[key] = Prism.languages['web-idl'][key]
|
|
56079
56766
|
}
|
|
56080
56767
|
}
|
|
56768
|
+
|
|
56081
56769
|
Prism.languages['webidl'] = Prism.languages['web-idl']
|
|
56082
56770
|
})(Prism)
|
|
56083
56771
|
}
|
|
56084
56772
|
|
|
56773
|
+
;// CONCATENATED MODULE: ../node_modules/refractor/lang/wgsl.js
|
|
56774
|
+
// @ts-nocheck
|
|
56775
|
+
wgsl.displayName = 'wgsl'
|
|
56776
|
+
wgsl.aliases = []
|
|
56777
|
+
|
|
56778
|
+
/** @type {import('../core.js').Syntax} */
|
|
56779
|
+
function wgsl(Prism) {
|
|
56780
|
+
Prism.languages.wgsl = {
|
|
56781
|
+
comment: {
|
|
56782
|
+
pattern: /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,
|
|
56783
|
+
greedy: true
|
|
56784
|
+
},
|
|
56785
|
+
'builtin-attribute': {
|
|
56786
|
+
pattern: /(@)builtin\(.*?\)/,
|
|
56787
|
+
lookbehind: true,
|
|
56788
|
+
inside: {
|
|
56789
|
+
attribute: {
|
|
56790
|
+
pattern: /^builtin/,
|
|
56791
|
+
alias: 'attr-name'
|
|
56792
|
+
},
|
|
56793
|
+
punctuation: /[(),]/,
|
|
56794
|
+
'built-in-values': {
|
|
56795
|
+
pattern:
|
|
56796
|
+
/\b(?:frag_depth|front_facing|global_invocation_id|instance_index|local_invocation_id|local_invocation_index|num_workgroups|position|sample_index|sample_mask|vertex_index|workgroup_id)\b/,
|
|
56797
|
+
alias: 'attr-value'
|
|
56798
|
+
}
|
|
56799
|
+
}
|
|
56800
|
+
},
|
|
56801
|
+
attributes: {
|
|
56802
|
+
pattern:
|
|
56803
|
+
/(@)(?:align|binding|compute|const|fragment|group|id|interpolate|invariant|location|size|vertex|workgroup_size)/i,
|
|
56804
|
+
lookbehind: true,
|
|
56805
|
+
alias: 'attr-name'
|
|
56806
|
+
},
|
|
56807
|
+
functions: {
|
|
56808
|
+
pattern: /\b(fn\s+)[_a-zA-Z]\w*(?=[(<])/,
|
|
56809
|
+
lookbehind: true,
|
|
56810
|
+
alias: 'function'
|
|
56811
|
+
},
|
|
56812
|
+
keyword:
|
|
56813
|
+
/\b(?:bitcast|break|case|const|continue|continuing|default|discard|else|enable|fallthrough|fn|for|function|if|let|loop|private|return|storage|struct|switch|type|uniform|var|while|workgroup)\b/,
|
|
56814
|
+
builtin:
|
|
56815
|
+
/\b(?:abs|acos|acosh|all|any|array|asin|asinh|atan|atan2|atanh|atomic|atomicAdd|atomicAnd|atomicCompareExchangeWeak|atomicExchange|atomicLoad|atomicMax|atomicMin|atomicOr|atomicStore|atomicSub|atomicXor|bool|ceil|clamp|cos|cosh|countLeadingZeros|countOneBits|countTrailingZeros|cross|degrees|determinant|distance|dot|dpdx|dpdxCoarse|dpdxFine|dpdy|dpdyCoarse|dpdyFine|exp|exp2|extractBits|f32|f64|faceForward|firstLeadingBit|floor|fma|fract|frexp|fwidth|fwidthCoarse|fwidthFine|i32|i64|insertBits|inverseSqrt|ldexp|length|log|log2|mat[2-4]x[2-4]|max|min|mix|modf|normalize|override|pack2x16float|pack2x16snorm|pack2x16unorm|pack4x8snorm|pack4x8unorm|pow|ptr|quantizeToF16|radians|reflect|refract|reverseBits|round|sampler|sampler_comparison|select|shiftLeft|shiftRight|sign|sin|sinh|smoothstep|sqrt|staticAssert|step|storageBarrier|tan|tanh|textureDimensions|textureGather|textureGatherCompare|textureLoad|textureNumLayers|textureNumLevels|textureNumSamples|textureSample|textureSampleBias|textureSampleCompare|textureSampleCompareLevel|textureSampleGrad|textureSampleLevel|textureStore|texture_1d|texture_2d|texture_2d_array|texture_3d|texture_cube|texture_cube_array|texture_depth_2d|texture_depth_2d_array|texture_depth_cube|texture_depth_cube_array|texture_depth_multisampled_2d|texture_multisampled_2d|texture_storage_1d|texture_storage_2d|texture_storage_2d_array|texture_storage_3d|transpose|trunc|u32|u64|unpack2x16float|unpack2x16snorm|unpack2x16unorm|unpack4x8snorm|unpack4x8unorm|vec[2-4]|workgroupBarrier)\b/,
|
|
56816
|
+
'function-calls': {
|
|
56817
|
+
pattern: /\b[_a-z]\w*(?=\()/i,
|
|
56818
|
+
alias: 'function'
|
|
56819
|
+
},
|
|
56820
|
+
'class-name': /\b(?:[A-Z][A-Za-z0-9]*)\b/,
|
|
56821
|
+
'bool-literal': {
|
|
56822
|
+
pattern: /\b(?:false|true)\b/,
|
|
56823
|
+
alias: 'boolean'
|
|
56824
|
+
},
|
|
56825
|
+
'hex-int-literal': {
|
|
56826
|
+
pattern: /\b0[xX][0-9a-fA-F]+[iu]?\b(?![.pP])/,
|
|
56827
|
+
alias: 'number'
|
|
56828
|
+
},
|
|
56829
|
+
'hex-float-literal': {
|
|
56830
|
+
pattern: /\b0[xX][0-9a-fA-F]*(?:\.[0-9a-fA-F]*)?(?:[pP][+-]?\d+[fh]?)?/,
|
|
56831
|
+
alias: 'number'
|
|
56832
|
+
},
|
|
56833
|
+
'decimal-float-literal': [
|
|
56834
|
+
{
|
|
56835
|
+
pattern: /\d*\.\d+(?:[eE](?:\+|-)?\d+)?[fh]?/,
|
|
56836
|
+
alias: 'number'
|
|
56837
|
+
},
|
|
56838
|
+
{
|
|
56839
|
+
pattern: /\d+\.\d*(?:[eE](?:\+|-)?\d+)?[fh]?/,
|
|
56840
|
+
alias: 'number'
|
|
56841
|
+
},
|
|
56842
|
+
{
|
|
56843
|
+
pattern: /\d+[eE](?:\+|-)?\d+[fh]?/,
|
|
56844
|
+
alias: 'number'
|
|
56845
|
+
},
|
|
56846
|
+
{
|
|
56847
|
+
pattern: /\b\d+[fh]\b/,
|
|
56848
|
+
alias: 'number'
|
|
56849
|
+
}
|
|
56850
|
+
],
|
|
56851
|
+
'int-literal': {
|
|
56852
|
+
pattern: /\b\d+[iu]?\b/,
|
|
56853
|
+
alias: 'number'
|
|
56854
|
+
},
|
|
56855
|
+
operator: [
|
|
56856
|
+
{
|
|
56857
|
+
pattern: /(?:\^|~|\|(?!\|)|\|\||&&|<<|>>|!)(?!=)/
|
|
56858
|
+
},
|
|
56859
|
+
{
|
|
56860
|
+
pattern: /&(?![&=])/
|
|
56861
|
+
},
|
|
56862
|
+
{
|
|
56863
|
+
pattern: /(?:\+=|-=|\*=|\/=|%=|\^=|&=|\|=|<<=|>>=)/
|
|
56864
|
+
},
|
|
56865
|
+
{
|
|
56866
|
+
pattern: /(^|[^<>=!])=(?![=>])/,
|
|
56867
|
+
lookbehind: true
|
|
56868
|
+
},
|
|
56869
|
+
{
|
|
56870
|
+
pattern: /(?:==|!=|<=|\+\+|--|(^|[^=])>=)/,
|
|
56871
|
+
lookbehind: true
|
|
56872
|
+
},
|
|
56873
|
+
{
|
|
56874
|
+
pattern: /(?:(?:[+%]|(?:\*(?!\w)))(?!=))|(?:-(?!>))|(?:\/(?!\/))/
|
|
56875
|
+
},
|
|
56876
|
+
{
|
|
56877
|
+
pattern: /->/
|
|
56878
|
+
}
|
|
56879
|
+
],
|
|
56880
|
+
punctuation: /[@(){}[\],;<>:.]/
|
|
56881
|
+
}
|
|
56882
|
+
}
|
|
56883
|
+
|
|
56085
56884
|
;// CONCATENATED MODULE: ../node_modules/refractor/lang/wiki.js
|
|
56086
56885
|
// @ts-nocheck
|
|
56087
56886
|
|
|
@@ -56465,6 +57264,7 @@ function xmlDoc(Prism) {
|
|
|
56465
57264
|
})
|
|
56466
57265
|
}
|
|
56467
57266
|
}
|
|
57267
|
+
|
|
56468
57268
|
var tag = Prism.languages.markup.tag
|
|
56469
57269
|
var slashDocComment = {
|
|
56470
57270
|
pattern: /\/\/\/.*/,
|
|
@@ -56597,20 +57397,26 @@ function xquery(Prism) {
|
|
|
56597
57397
|
inside: Prism.languages.xquery,
|
|
56598
57398
|
alias: 'language-xquery'
|
|
56599
57399
|
} // The following will handle plain text inside tags
|
|
57400
|
+
|
|
56600
57401
|
var stringifyToken = function (token) {
|
|
56601
57402
|
if (typeof token === 'string') {
|
|
56602
57403
|
return token
|
|
56603
57404
|
}
|
|
57405
|
+
|
|
56604
57406
|
if (typeof token.content === 'string') {
|
|
56605
57407
|
return token.content
|
|
56606
57408
|
}
|
|
57409
|
+
|
|
56607
57410
|
return token.content.map(stringifyToken).join('')
|
|
56608
57411
|
}
|
|
57412
|
+
|
|
56609
57413
|
var walkTokens = function (tokens) {
|
|
56610
57414
|
var openedTags = []
|
|
57415
|
+
|
|
56611
57416
|
for (var i = 0; i < tokens.length; i++) {
|
|
56612
57417
|
var token = tokens[i]
|
|
56613
57418
|
var notTagNorBrace = false
|
|
57419
|
+
|
|
56614
57420
|
if (typeof token !== 'string') {
|
|
56615
57421
|
if (
|
|
56616
57422
|
token.type === 'tag' &&
|
|
@@ -56664,6 +57470,7 @@ function xquery(Prism) {
|
|
|
56664
57470
|
notTagNorBrace = true
|
|
56665
57471
|
}
|
|
56666
57472
|
}
|
|
57473
|
+
|
|
56667
57474
|
if (notTagNorBrace || typeof token === 'string') {
|
|
56668
57475
|
if (
|
|
56669
57476
|
openedTags.length > 0 &&
|
|
@@ -56672,6 +57479,7 @@ function xquery(Prism) {
|
|
|
56672
57479
|
// Here we are inside a tag, and not inside an XQuery expression.
|
|
56673
57480
|
// That's plain text: drop any tokens matched.
|
|
56674
57481
|
var plainText = stringifyToken(token) // And merge text with adjacent text
|
|
57482
|
+
|
|
56675
57483
|
if (
|
|
56676
57484
|
i < tokens.length - 1 &&
|
|
56677
57485
|
(typeof tokens[i + 1] === 'string' ||
|
|
@@ -56680,6 +57488,7 @@ function xquery(Prism) {
|
|
|
56680
57488
|
plainText += stringifyToken(tokens[i + 1])
|
|
56681
57489
|
tokens.splice(i + 1, 1)
|
|
56682
57490
|
}
|
|
57491
|
+
|
|
56683
57492
|
if (
|
|
56684
57493
|
i > 0 &&
|
|
56685
57494
|
(typeof tokens[i - 1] === 'string' ||
|
|
@@ -56689,6 +57498,7 @@ function xquery(Prism) {
|
|
|
56689
57498
|
tokens.splice(i - 1, 1)
|
|
56690
57499
|
i--
|
|
56691
57500
|
}
|
|
57501
|
+
|
|
56692
57502
|
if (/^\s+$/.test(plainText)) {
|
|
56693
57503
|
tokens[i] = plainText
|
|
56694
57504
|
} else {
|
|
@@ -56701,15 +57511,18 @@ function xquery(Prism) {
|
|
|
56701
57511
|
}
|
|
56702
57512
|
}
|
|
56703
57513
|
}
|
|
57514
|
+
|
|
56704
57515
|
if (token.content && typeof token.content !== 'string') {
|
|
56705
57516
|
walkTokens(token.content)
|
|
56706
57517
|
}
|
|
56707
57518
|
}
|
|
56708
57519
|
}
|
|
57520
|
+
|
|
56709
57521
|
Prism.hooks.add('after-tokenize', function (env) {
|
|
56710
57522
|
if (env.language !== 'xquery') {
|
|
56711
57523
|
return
|
|
56712
57524
|
}
|
|
57525
|
+
|
|
56713
57526
|
walkTokens(env.tokens)
|
|
56714
57527
|
})
|
|
56715
57528
|
})(Prism)
|
|
@@ -56757,6 +57570,7 @@ function zig(Prism) {
|
|
|
56757
57570
|
return str
|
|
56758
57571
|
}
|
|
56759
57572
|
}
|
|
57573
|
+
|
|
56760
57574
|
var keyword =
|
|
56761
57575
|
/\b(?:align|allowzero|and|anyframe|anytype|asm|async|await|break|cancel|catch|comptime|const|continue|defer|else|enum|errdefer|error|export|extern|fn|for|if|inline|linksection|nakedcc|noalias|nosuspend|null|or|orelse|packed|promise|pub|resume|return|stdcallcc|struct|suspend|switch|test|threadlocal|try|undefined|union|unreachable|usingnamespace|var|volatile|while)\b/
|
|
56762
57576
|
var IDENTIFIER = '\\b(?!' + keyword.source + ')(?!\\d)\\w+\\b'
|
|
@@ -56789,6 +57603,7 @@ function zig(Prism) {
|
|
|
56789
57603
|
* IDENTIFIER = \b (?! KEYWORD ) [a-zA-Z_] \w* \b
|
|
56790
57604
|
*
|
|
56791
57605
|
*/
|
|
57606
|
+
|
|
56792
57607
|
Prism.languages.zig = {
|
|
56793
57608
|
comment: [
|
|
56794
57609
|
{
|
|
@@ -57164,6 +57979,13 @@ function zig(Prism) {
|
|
|
57164
57979
|
|
|
57165
57980
|
|
|
57166
57981
|
|
|
57982
|
+
|
|
57983
|
+
|
|
57984
|
+
|
|
57985
|
+
|
|
57986
|
+
|
|
57987
|
+
|
|
57988
|
+
|
|
57167
57989
|
|
|
57168
57990
|
|
|
57169
57991
|
|
|
@@ -57212,10 +58034,12 @@ refractor.register(awk)
|
|
|
57212
58034
|
refractor.register(basic)
|
|
57213
58035
|
refractor.register(batch)
|
|
57214
58036
|
refractor.register(bbcode)
|
|
58037
|
+
refractor.register(bbj)
|
|
57215
58038
|
refractor.register(bicep)
|
|
57216
58039
|
refractor.register(birb)
|
|
57217
58040
|
refractor.register(bison)
|
|
57218
58041
|
refractor.register(bnf)
|
|
58042
|
+
refractor.register(bqn)
|
|
57219
58043
|
refractor.register(brainfuck)
|
|
57220
58044
|
refractor.register(brightscript)
|
|
57221
58045
|
refractor.register(bro)
|
|
@@ -57223,6 +58047,8 @@ refractor.register(bsl)
|
|
|
57223
58047
|
refractor.register(cfscript)
|
|
57224
58048
|
refractor.register(chaiscript)
|
|
57225
58049
|
refractor.register(cil)
|
|
58050
|
+
refractor.register(cilkc)
|
|
58051
|
+
refractor.register(cilkcpp)
|
|
57226
58052
|
refractor.register(clojure)
|
|
57227
58053
|
refractor.register(cmake)
|
|
57228
58054
|
refractor.register(cobol)
|
|
@@ -57279,6 +58105,7 @@ refractor.register(gn)
|
|
|
57279
58105
|
refractor.register(linkerScript)
|
|
57280
58106
|
refractor.register(go)
|
|
57281
58107
|
refractor.register(goModule)
|
|
58108
|
+
refractor.register(gradle)
|
|
57282
58109
|
refractor.register(graphql)
|
|
57283
58110
|
refractor.register(groovy)
|
|
57284
58111
|
refractor.register(less)
|
|
@@ -57345,6 +58172,7 @@ refractor.register(matlab)
|
|
|
57345
58172
|
refractor.register(maxscript)
|
|
57346
58173
|
refractor.register(mel)
|
|
57347
58174
|
refractor.register(mermaid)
|
|
58175
|
+
refractor.register(metafont)
|
|
57348
58176
|
refractor.register(mizar)
|
|
57349
58177
|
refractor.register(mongodb)
|
|
57350
58178
|
refractor.register(monkey)
|
|
@@ -57453,6 +58281,7 @@ refractor.register(visualBasic)
|
|
|
57453
58281
|
refractor.register(warpscript)
|
|
57454
58282
|
refractor.register(wasm)
|
|
57455
58283
|
refractor.register(webIdl)
|
|
58284
|
+
refractor.register(wgsl)
|
|
57456
58285
|
refractor.register(wiki)
|
|
57457
58286
|
refractor.register(wolfram)
|
|
57458
58287
|
refractor.register(wren)
|
|
@@ -57466,7 +58295,7 @@ refractor.register(zig)
|
|
|
57466
58295
|
|
|
57467
58296
|
|
|
57468
58297
|
;// CONCATENATED MODULE: ../node_modules/rehype-prism-plus/dist/rehype-prism-plus.es.js
|
|
57469
|
-
function
|
|
58298
|
+
function l(){l=function(e,r){return new t(e,void 0,r)};var e=RegExp.prototype,r=new WeakMap;function t(e,n,i){var o=new RegExp(e,n);return r.set(o,i||r.get(e)),a(o,t.prototype)}function n(e,t){var n=r.get(t);return Object.keys(n).reduce(function(r,t){return r[t]=e[n[t]],r},Object.create(null))}return rehype_prism_plus_es_s(t,RegExp),t.prototype.exec=function(r){var t=e.exec.call(this,r);return t&&(t.groups=n(t,this)),t},t.prototype[Symbol.replace]=function(t,i){if("string"==typeof i){var o=r.get(this);return e[Symbol.replace].call(this,t,i.replace(/\$<([^>]+)>/g,function(e,r){return"$"+o[r]}))}if("function"==typeof i){var l=this;return e[Symbol.replace].call(this,t,function(){var e=arguments;return"object"!=typeof e[e.length-1]&&(e=[].slice.call(e)).push(n(e,l)),i.apply(this,e)})}return e[Symbol.replace].call(this,t,i)},l.apply(this,arguments)}function rehype_prism_plus_es_s(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),r&&a(e,r)}function a(e,r){return a=Object.setPrototypeOf||function(e,r){return e.__proto__=r,e},a(e,r)}function rehype_prism_plus_es_u(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function rehype_prism_plus_es_c(e,r){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(t)return(t=t.call(e)).next.bind(t);if(Array.isArray(e)||(t=function(e,r){if(e){if("string"==typeof e)return rehype_prism_plus_es_u(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?rehype_prism_plus_es_u(e,r):void 0}}(e))||r&&e&&"number"==typeof e.length){t&&(e=t);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var p=function(i){return function(o){return void 0===o&&(o={}),function(r){visit(r,"element",s)};function s(e,s,a){if(a&&"pre"===a.tagName&&"code"===e.tagName){var u=e.data&&e.data.meta?e.data.meta:"";e.properties.className?"boolean"==typeof e.properties.className?e.properties.className=[]:Array.isArray(e.properties.className)||(e.properties.className=[e.properties.className]):e.properties.className=[],e.properties.className.push("code-highlight");var p,f,m=function(e){for(var r,t=rehype_prism_plus_es_c(e.properties.className);!(r=t()).done;){var n=r.value;if("language-"===n.slice(0,9))return n.slice(9).toLowerCase()}return null}(e);if(m)try{var h;h=null!=m&&m.includes("diff-")?m.split("-")[1]:m,p=i.highlight(hast_util_to_string_toString(e),h),a.properties.className=(a.properties.className||[]).concat("language-"+h)}catch(r){if(!o.ignoreMissing||!/Unknown language/.test(r.message))throw r;p=e}else p=e;p.children=(f=1,function e(r){return r.reduce(function(r,t){if("text"===t.type){var n=t.value,i=(n.match(/\n/g)||"").length;if(0===i)t.position={start:{line:f,column:1},end:{line:f,column:1}},r.push(t);else for(var o,l=n.split("\n"),s=rehype_prism_plus_es_c(l.entries());!(o=s()).done;){var a=o.value,u=a[0],p=a[1];r.push({type:"text",value:u===l.length-1?p:p+"\n",position:{start:{line:f+u,column:1},end:{line:f+u,column:1}}})}return f+=i,r}if(Object.prototype.hasOwnProperty.call(t,"children")){var m=f;return t.children=e(t.children),r.push(t),t.position={start:{line:m,column:1},end:{line:f,column:1}},r}return r.push(t),r},[])})(p.children),p.position=p.children.length>0?{start:{line:p.children[0].position.start.line,column:0},end:{line:p.children[p.children.length-1].position.end.line,column:0}}:{start:{line:0,column:0},end:{line:0,column:0}};for(var d,g=function(e){var r=/{([\d,-]+)}/,t=e.split(",").map(function(e){return e.trim()}).join();if(r.test(t)){var i=r.exec(t)[1],o=parse_numeric_range(i);return function(e){return o.includes(e+1)}}return function(){return!1}}(u),y=function(e){var r=/*#__PURE__*/l(/showLineNumbers=([0-9]+)/i,{lines:1});if(r.test(e)){var t=r.exec(e);return Number(t.groups.lines)}return 1}(u),v=function(e){for(var r=new Array(e),t=0;t<e;t++)r[t]={type:"element",tagName:"span",properties:{className:[]},children:[]};return r}(p.position.end.line),b=["showlinenumbers=false",'showlinenumbers="false"',"showlinenumbers={false}"],w=function(){var e=d.value,n=e[0],i=e[1];i.properties.className=["code-line"];var l=filter(p,function(e){return e.position.start.line<=n+1&&e.position.end.line>=n+1});i.children=l.children,!u.toLowerCase().includes("showLineNumbers".toLowerCase())&&!o.showLineNumbers||b.some(function(e){return u.toLowerCase().includes(e)})||(i.properties.line=[(n+y).toString()],i.properties.className.push("line-number")),g(n)&&i.properties.className.push("highlight-line"),("diff"===m||null!=m&&m.includes("diff-"))&&"-"===hast_util_to_string_toString(i).substring(0,1)?i.properties.className.push("deleted"):("diff"===m||null!=m&&m.includes("diff-"))&&"+"===hast_util_to_string_toString(i).substring(0,1)&&i.properties.className.push("inserted")},N=rehype_prism_plus_es_c(v.entries());!(d=N()).done;)w();v.length>0&&""===hast_util_to_string_toString(v[v.length-1]).trim()&&v.pop(),e.children=v}}}},f=p(refractor),m=p(refractor);
|
|
57470
58299
|
//# sourceMappingURL=rehype-prism-plus.es.js.map
|
|
57471
58300
|
|
|
57472
58301
|
;// CONCATENATED MODULE: ../node_modules/direction/index.js
|
|
@@ -62017,7 +62846,7 @@ var Editor_excluded=["prefixCls","className","value","commands","commandsFilter"
|
|
|
62017
62846
|
[highlightEnable]);// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
62018
62847
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function(){return autoFocus!==state.autoFocus&&dispatch({autoFocus:autoFocus});},[autoFocus]);(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function(){return fullscreen!==state.fullscreen&&dispatch({fullscreen:fullscreen});},// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
62019
62848
|
[fullscreen]);// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
62020
|
-
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function(){return height!==state.height&&dispatch({height:height});},[height]);(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function(){return height!==state.height&&onHeightChange&&onHeightChange(state.height,height,state);},[height,onHeightChange,state]);var textareaDomRef=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();var active=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)('preview');var initScroll=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function(){textareaDomRef.current=state.textareaWarp;if(state.textareaWarp){state.textareaWarp.addEventListener('mouseover',function(){active.current='text';});state.textareaWarp.addEventListener('mouseleave',function(){active.current='preview';});}},[state.textareaWarp]);var handleScroll=function handleScroll(e,type){if(!enableScrollRef.current)return;var textareaDom=textareaDomRef.current;var previewDom=previewRef.current?previewRef.current
|
|
62849
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function(){return height!==state.height&&dispatch({height:height});},[height]);(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function(){return height!==state.height&&onHeightChange&&onHeightChange(state.height,height,state);},[height,onHeightChange,state]);var textareaDomRef=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();var active=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)('preview');var initScroll=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function(){textareaDomRef.current=state.textareaWarp;if(state.textareaWarp){state.textareaWarp.addEventListener('mouseover',function(){active.current='text';});state.textareaWarp.addEventListener('mouseleave',function(){active.current='preview';});}},[state.textareaWarp]);var handleScroll=function handleScroll(e,type){if(!enableScrollRef.current)return;var textareaDom=textareaDomRef.current;var previewDom=previewRef.current?previewRef.current:undefined;if(!initScroll.current){active.current=type;initScroll.current=true;}if(textareaDom&&previewDom){var scale=(textareaDom.scrollHeight-textareaDom.offsetHeight)/(previewDom.scrollHeight-previewDom.offsetHeight);if(e.target===textareaDom&&active.current==='text'){previewDom.scrollTop=textareaDom.scrollTop/scale;}if(e.target===previewDom&&active.current==='preview'){textareaDom.scrollTop=previewDom.scrollTop*scale;}var scrollTop=0;if(active.current==='text'){scrollTop=textareaDom.scrollTop||0;}else if(active.current==='preview'){scrollTop=previewDom.scrollTop||0;}dispatch({scrollTop:scrollTop});}};var previewClassName="".concat(prefixCls,"-preview ").concat(previewOptions.className||'');var handlePreviewScroll=function handlePreviewScroll(e){return handleScroll(e,'preview');};var mdPreview=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function(){return/*#__PURE__*/(0,jsx_runtime.jsx)("div",{ref:previewRef,className:previewClassName,children:/*#__PURE__*/(0,jsx_runtime.jsx)(esm,_objectSpread2(_objectSpread2({},previewOptions),{},{onScroll:handlePreviewScroll,source:state.markdown||''}))});},[previewClassName,previewOptions,state.markdown]);var preview=(components===null||components===void 0?void 0:components.preview)&&(components===null||components===void 0?void 0:components.preview(state.markdown||'',state,dispatch));if(preview&&/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().isValidElement(preview)){mdPreview=/*#__PURE__*/(0,jsx_runtime.jsx)("div",{className:previewClassName,ref:previewRef,onScroll:handlePreviewScroll,children:preview});}var containerStyle=_objectSpread2(_objectSpread2({},other.style),{},{height:state.height||'100%'});var containerClick=function containerClick(){return dispatch({barPopup:_objectSpread2({},setGroupPopFalse(state.barPopup))});};var dragBarChange=function dragBarChange(newHeight){return dispatch({height:newHeight});};return/*#__PURE__*/(0,jsx_runtime.jsx)(EditorContext.Provider,{value:_objectSpread2(_objectSpread2({},state),{},{dispatch:dispatch}),children:/*#__PURE__*/(0,jsx_runtime.jsxs)("div",_objectSpread2(_objectSpread2({ref:container,className:cls},other),{},{onClick:containerClick,style:containerStyle,children:[!hideToolbar&&!toolbarBottom&&/*#__PURE__*/(0,jsx_runtime.jsx)(Toolbar_Toolbar,{prefixCls:prefixCls,overflow:overflow,toolbarBottom:toolbarBottom}),/*#__PURE__*/(0,jsx_runtime.jsxs)("div",{className:"".concat(prefixCls,"-content"),children:[/(edit|live)/.test(state.preview||'')&&/*#__PURE__*/(0,jsx_runtime.jsx)(TextArea_TextArea,_objectSpread2(_objectSpread2({className:"".concat(prefixCls,"-input"),prefixCls:prefixCls,autoFocus:autoFocus},textareaProps),{},{onChange:function onChange(evn){_onChange&&_onChange(evn.target.value,evn,state);if(textareaProps&&textareaProps.onChange){textareaProps.onChange(evn);}},renderTextarea:(components===null||components===void 0?void 0:components.textarea)||renderTextarea,onScroll:function onScroll(e){return handleScroll(e,'text');}})),/(live|preview)/.test(state.preview||'')&&mdPreview]}),visibleDragbar&&!state.fullscreen&&/*#__PURE__*/(0,jsx_runtime.jsx)(components_DragBar,{prefixCls:prefixCls,height:state.height,maxHeight:maxHeight,minHeight:minHeight,onChange:dragBarChange}),!hideToolbar&&toolbarBottom&&/*#__PURE__*/(0,jsx_runtime.jsx)(Toolbar_Toolbar,{prefixCls:prefixCls,overflow:overflow,toolbarBottom:toolbarBottom})]}))});};var mdEditor=/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(InternalMDEditor);mdEditor.Markdown=esm;/* harmony default export */ const Editor = (mdEditor);
|
|
62021
62850
|
;// CONCATENATED MODULE: ./src/index.tsx
|
|
62022
62851
|
/* harmony default export */ const src_0 = (Editor);
|
|
62023
62852
|
})();
|