wip: improve prism loading times
This commit is contained in:
parent
6195b1faac
commit
0c4e223396
245 changed files with 6205 additions and 115 deletions
48
assets/js/components/prism-abap.js
Normal file
48
assets/js/components/prism-abap.js
Normal file
File diff suppressed because one or more lines are too long
1
assets/js/components/prism-abap.min.js
vendored
Normal file
1
assets/js/components/prism-abap.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
17
assets/js/components/prism-actionscript.js
Normal file
17
assets/js/components/prism-actionscript.js
Normal file
|
@ -0,0 +1,17 @@
|
|||
Prism.languages.actionscript = Prism.languages.extend('javascript', {
|
||||
'keyword': /\b(?:as|break|case|catch|class|const|default|delete|do|else|extends|finally|for|function|if|implements|import|in|instanceof|interface|internal|is|native|new|null|package|private|protected|public|return|super|switch|this|throw|try|typeof|use|var|void|while|with|dynamic|each|final|get|include|namespace|native|override|set|static)\b/,
|
||||
'operator': /\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/
|
||||
});
|
||||
Prism.languages.actionscript['class-name'].alias = 'function';
|
||||
|
||||
if (Prism.languages.markup) {
|
||||
Prism.languages.insertBefore('actionscript', 'string', {
|
||||
'xml': {
|
||||
pattern: /(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\\1|\\?(?!\1)[\s\S])*\2)*\s*\/?>/,
|
||||
lookbehind: true,
|
||||
inside: {
|
||||
rest: Prism.languages.markup
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
1
assets/js/components/prism-actionscript.min.js
vendored
Normal file
1
assets/js/components/prism-actionscript.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
Prism.languages.actionscript=Prism.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|else|extends|finally|for|function|if|implements|import|in|instanceof|interface|internal|is|native|new|null|package|private|protected|public|return|super|switch|this|throw|try|typeof|use|var|void|while|with|dynamic|each|final|get|include|namespace|native|override|set|static)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/}),Prism.languages.actionscript["class-name"].alias="function",Prism.languages.markup&&Prism.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\\1|\\?(?!\1)[\s\S])*\2)*\s*\/?>/,lookbehind:!0,inside:{rest:Prism.languages.markup}}});
|
19
assets/js/components/prism-ada.js
Normal file
19
assets/js/components/prism-ada.js
Normal file
|
@ -0,0 +1,19 @@
|
|||
Prism.languages.ada = {
|
||||
'comment': /--.*/,
|
||||
'string': /"(?:""|[^"\r\f\n])*"/i,
|
||||
'number': [
|
||||
{
|
||||
pattern: /\b\d(?:_?\d)*#[0-9A-F](?:_?[0-9A-F])*(?:\.[0-9A-F](?:_?[0-9A-F])*)?#(?:E[+-]?\d(?:_?\d)*)?/i
|
||||
},
|
||||
{
|
||||
pattern: /\b\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:E[+-]?\d(?:_?\d)*)?\b/i
|
||||
}
|
||||
],
|
||||
'attr-name': /\b'\w+/i,
|
||||
'keyword': /\b(?:abort|abs|abstract|accept|access|aliased|all|and|array|at|begin|body|case|constant|declare|delay|delta|digits|do|else|new|return|elsif|end|entry|exception|exit|for|function|generic|goto|if|in|interface|is|limited|loop|mod|not|null|of|others|out|overriding|package|pragma|private|procedure|protected|raise|range|record|rem|renames|requeue|reverse|select|separate|some|subtype|synchronized|tagged|task|terminate|then|type|until|use|when|while|with|xor)\b/i,
|
||||
'boolean': /\b(?:true|false)\b/i,
|
||||
'operator': /<[=>]?|>=?|=>?|:=|\/=?|\*\*?|[&+-]/,
|
||||
'punctuation': /\.\.?|[,;():]/,
|
||||
'char': /'.'/,
|
||||
'variable': /\b[a-z](?:[_a-z\d])*\b/i
|
||||
};
|
1
assets/js/components/prism-ada.min.js
vendored
Normal file
1
assets/js/components/prism-ada.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
Prism.languages.ada={comment:/--.*/,string:/"(?:""|[^"\r\f\n])*"/i,number:[{pattern:/\b\d(?:_?\d)*#[0-9A-F](?:_?[0-9A-F])*(?:\.[0-9A-F](?:_?[0-9A-F])*)?#(?:E[+-]?\d(?:_?\d)*)?/i},{pattern:/\b\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:E[+-]?\d(?:_?\d)*)?\b/i}],"attr-name":/\b'\w+/i,keyword:/\b(?:abort|abs|abstract|accept|access|aliased|all|and|array|at|begin|body|case|constant|declare|delay|delta|digits|do|else|new|return|elsif|end|entry|exception|exit|for|function|generic|goto|if|in|interface|is|limited|loop|mod|not|null|of|others|out|overriding|package|pragma|private|procedure|protected|raise|range|record|rem|renames|requeue|reverse|select|separate|some|subtype|synchronized|tagged|task|terminate|then|type|until|use|when|while|with|xor)\b/i,"boolean":/\b(?:true|false)\b/i,operator:/<[=>]?|>=?|=>?|:=|\/=?|\*\*?|[&+-]/,punctuation:/\.\.?|[,;():]/,"char":/'.'/,variable:/\b[a-z](?:[_a-z\d])*\b/i};
|
47
assets/js/components/prism-apacheconf.js
Normal file
47
assets/js/components/prism-apacheconf.js
Normal file
File diff suppressed because one or more lines are too long
1
assets/js/components/prism-apacheconf.min.js
vendored
Normal file
1
assets/js/components/prism-apacheconf.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
32
assets/js/components/prism-apl.js
Normal file
32
assets/js/components/prism-apl.js
Normal file
|
@ -0,0 +1,32 @@
|
|||
Prism.languages.apl = {
|
||||
'comment': /(?:⍝|#[! ]).*$/m,
|
||||
'string': {
|
||||
pattern: /'(?:[^'\r\n]|'')*'/,
|
||||
greedy: true
|
||||
},
|
||||
'number': /¯?(?:\d*\.?\d+(?:e[+¯]?\d+)?|¯|∞)(?:j¯?(?:\d*\.?\d+(?:e[\+¯]?\d+)?|¯|∞))?/i,
|
||||
'statement': /:[A-Z][a-z][A-Za-z]*\b/,
|
||||
'system-function': {
|
||||
pattern: /⎕[A-Z]+/i,
|
||||
alias: 'function'
|
||||
},
|
||||
'constant': /[⍬⌾#⎕⍞]/,
|
||||
'function': /[-+×÷⌈⌊∣|⍳⍸?*⍟○!⌹<≤=>≥≠≡≢∊⍷∪∩~∨∧⍱⍲⍴,⍪⌽⊖⍉↑↓⊂⊃⊆⊇⌷⍋⍒⊤⊥⍕⍎⊣⊢⍁⍂≈⍯↗¤→]/,
|
||||
'monadic-operator': {
|
||||
pattern: /[\\\/⌿⍀¨⍨⌶&∥]/,
|
||||
alias: 'operator'
|
||||
},
|
||||
'dyadic-operator': {
|
||||
pattern: /[.⍣⍠⍤∘⌸@⌺]/,
|
||||
alias: 'operator'
|
||||
},
|
||||
'assignment': {
|
||||
pattern: /←/,
|
||||
alias: 'keyword'
|
||||
},
|
||||
'punctuation': /[\[;\]()◇⋄]/,
|
||||
'dfn': {
|
||||
pattern: /[{}⍺⍵⍶⍹∇⍫:]/,
|
||||
alias: 'builtin'
|
||||
}
|
||||
};
|
1
assets/js/components/prism-apl.min.js
vendored
Normal file
1
assets/js/components/prism-apl.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
Prism.languages.apl={comment:/(?:⍝|#[! ]).*$/m,string:{pattern:/'(?:[^'\r\n]|'')*'/,greedy:!0},number:/¯?(?:\d*\.?\d+(?:e[+¯]?\d+)?|¯|∞)(?:j¯?(?:\d*\.?\d+(?:e[\+¯]?\d+)?|¯|∞))?/i,statement:/:[A-Z][a-z][A-Za-z]*\b/,"system-function":{pattern:/⎕[A-Z]+/i,alias:"function"},constant:/[⍬⌾#⎕⍞]/,"function":/[-+×÷⌈⌊∣|⍳⍸?*⍟○!⌹<≤=>≥≠≡≢∊⍷∪∩~∨∧⍱⍲⍴,⍪⌽⊖⍉↑↓⊂⊃⊆⊇⌷⍋⍒⊤⊥⍕⍎⊣⊢⍁⍂≈⍯↗¤→]/,"monadic-operator":{pattern:/[\\\/⌿⍀¨⍨⌶&∥]/,alias:"operator"},"dyadic-operator":{pattern:/[.⍣⍠⍤∘⌸@⌺]/,alias:"operator"},assignment:{pattern:/←/,alias:"keyword"},punctuation:/[\[;\]()◇⋄]/,dfn:{pattern:/[{}⍺⍵⍶⍹∇⍫:]/,alias:"builtin"}};
|
20
assets/js/components/prism-applescript.js
Normal file
20
assets/js/components/prism-applescript.js
Normal file
|
@ -0,0 +1,20 @@
|
|||
Prism.languages.applescript = {
|
||||
'comment': [
|
||||
// Allow one level of nesting
|
||||
/\(\*(?:\(\*[\s\S]*?\*\)|[\s\S])*?\*\)/,
|
||||
/--.+/,
|
||||
/#.+/
|
||||
],
|
||||
'string': /"(?:\\?.)*?"/,
|
||||
'number': /\b-?\d*\.?\d+([Ee]-?\d+)?\b/,
|
||||
'operator': [
|
||||
/[&=≠≤≥*+\-\/÷^]|[<>]=?/,
|
||||
/\b(?:(?:start|begin|end)s? with|(?:(?:does not|doesn't) contain|contains?)|(?:is|isn't|is not) (?:in|contained by)|(?:(?:is|isn't|is not) )?(?:greater|less) than(?: or equal)?(?: to)?|(?:(?:does not|doesn't) come|comes) (?:before|after)|(?:is|isn't|is not) equal(?: to)?|(?:(?:does not|doesn't) equal|equals|equal to|isn't|is not)|(?:a )?(?:ref(?: to)?|reference to)|(?:and|or|div|mod|as|not))\b/
|
||||
],
|
||||
'keyword': /\b(?:about|above|after|against|apart from|around|aside from|at|back|before|beginning|behind|below|beneath|beside|between|but|by|considering|continue|copy|does|eighth|else|end|equal|error|every|exit|false|fifth|first|for|fourth|from|front|get|given|global|if|ignoring|in|instead of|into|is|it|its|last|local|me|middle|my|ninth|of|on|onto|out of|over|prop|property|put|repeat|return|returning|second|set|seventh|since|sixth|some|tell|tenth|that|the|then|third|through|thru|timeout|times|to|transaction|true|try|until|where|while|whose|with|without)\b/,
|
||||
'class': {
|
||||
pattern: /\b(?:alias|application|boolean|class|constant|date|file|integer|list|number|POSIX file|real|record|reference|RGB color|script|text|centimetres|centimeters|feet|inches|kilometres|kilometers|metres|meters|miles|yards|square feet|square kilometres|square kilometers|square metres|square meters|square miles|square yards|cubic centimetres|cubic centimeters|cubic feet|cubic inches|cubic metres|cubic meters|cubic yards|gallons|litres|liters|quarts|grams|kilograms|ounces|pounds|degrees Celsius|degrees Fahrenheit|degrees Kelvin)\b/,
|
||||
alias: 'builtin'
|
||||
},
|
||||
'punctuation': /[{}():,¬«»《》]/
|
||||
};
|
1
assets/js/components/prism-applescript.min.js
vendored
Normal file
1
assets/js/components/prism-applescript.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
Prism.languages.applescript={comment:[/\(\*(?:\(\*[\s\S]*?\*\)|[\s\S])*?\*\)/,/--.+/,/#.+/],string:/"(?:\\?.)*?"/,number:/\b-?\d*\.?\d+([Ee]-?\d+)?\b/,operator:[/[&=≠≤≥*+\-\/÷^]|[<>]=?/,/\b(?:(?:start|begin|end)s? with|(?:(?:does not|doesn't) contain|contains?)|(?:is|isn't|is not) (?:in|contained by)|(?:(?:is|isn't|is not) )?(?:greater|less) than(?: or equal)?(?: to)?|(?:(?:does not|doesn't) come|comes) (?:before|after)|(?:is|isn't|is not) equal(?: to)?|(?:(?:does not|doesn't) equal|equals|equal to|isn't|is not)|(?:a )?(?:ref(?: to)?|reference to)|(?:and|or|div|mod|as|not))\b/],keyword:/\b(?:about|above|after|against|apart from|around|aside from|at|back|before|beginning|behind|below|beneath|beside|between|but|by|considering|continue|copy|does|eighth|else|end|equal|error|every|exit|false|fifth|first|for|fourth|from|front|get|given|global|if|ignoring|in|instead of|into|is|it|its|last|local|me|middle|my|ninth|of|on|onto|out of|over|prop|property|put|repeat|return|returning|second|set|seventh|since|sixth|some|tell|tenth|that|the|then|third|through|thru|timeout|times|to|transaction|true|try|until|where|while|whose|with|without)\b/,"class":{pattern:/\b(?:alias|application|boolean|class|constant|date|file|integer|list|number|POSIX file|real|record|reference|RGB color|script|text|centimetres|centimeters|feet|inches|kilometres|kilometers|metres|meters|miles|yards|square feet|square kilometres|square kilometers|square metres|square meters|square miles|square yards|cubic centimetres|cubic centimeters|cubic feet|cubic inches|cubic metres|cubic meters|cubic yards|gallons|litres|liters|quarts|grams|kilograms|ounces|pounds|degrees Celsius|degrees Fahrenheit|degrees Kelvin)\b/,alias:"builtin"},punctuation:/[{}():,¬«»《》]/};
|
271
assets/js/components/prism-asciidoc.js
Normal file
271
assets/js/components/prism-asciidoc.js
Normal file
|
@ -0,0 +1,271 @@
|
|||
(function (Prism) {
|
||||
|
||||
var attributes = {
|
||||
pattern: /(^[ \t]*)\[(?!\[)(?:(["'$`])(?:(?!\2)[^\\]|\\.)*\2|\[(?:[^\]\\]|\\.)*\]|[^\]\\]|\\.)*\]/m,
|
||||
lookbehind: true,
|
||||
inside: {
|
||||
'quoted': {
|
||||
pattern: /([$`])(?:(?!\1)[^\\]|\\.)*\1/,
|
||||
inside: {
|
||||
'punctuation': /^[$`]|[$`]$/
|
||||
}
|
||||
},
|
||||
'interpreted': {
|
||||
pattern: /'(?:[^'\\]|\\.)*'/,
|
||||
inside: {
|
||||
'punctuation': /^'|'$/
|
||||
// See rest below
|
||||
}
|
||||
},
|
||||
'string': /"(?:[^"\\]|\\.)*"/,
|
||||
'variable': /\w+(?==)/,
|
||||
'punctuation': /^\[|\]$|,/,
|
||||
'operator': /=/,
|
||||
// The negative look-ahead prevents blank matches
|
||||
'attr-value': /(?!^\s+$).+/
|
||||
}
|
||||
};
|
||||
Prism.languages.asciidoc = {
|
||||
'comment-block': {
|
||||
pattern: /^(\/{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1/m,
|
||||
alias: 'comment'
|
||||
},
|
||||
'table': {
|
||||
pattern: /^\|={3,}(?:(?:\r?\n|\r).*)*?(?:\r?\n|\r)\|={3,}$/m,
|
||||
inside: {
|
||||
'specifiers': {
|
||||
pattern: /(?!\|)(?:(?:(?:\d+(?:\.\d+)?|\.\d+)[+*])?(?:[<^>](?:\.[<^>])?|\.[<^>])?[a-z]*)(?=\|)/,
|
||||
alias: 'attr-value'
|
||||
},
|
||||
'punctuation': {
|
||||
pattern: /(^|[^\\])[|!]=*/,
|
||||
lookbehind: true
|
||||
}
|
||||
// See rest below
|
||||
}
|
||||
},
|
||||
|
||||
'passthrough-block': {
|
||||
pattern: /^(\+{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,
|
||||
inside: {
|
||||
'punctuation': /^\++|\++$/
|
||||
// See rest below
|
||||
}
|
||||
},
|
||||
// Literal blocks and listing blocks
|
||||
'literal-block': {
|
||||
pattern: /^(-{4,}|\.{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,
|
||||
inside: {
|
||||
'punctuation': /^(?:-+|\.+)|(?:-+|\.+)$/
|
||||
// See rest below
|
||||
}
|
||||
},
|
||||
// Sidebar blocks, quote blocks, example blocks and open blocks
|
||||
'other-block': {
|
||||
pattern: /^(--|\*{4,}|_{4,}|={4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,
|
||||
inside: {
|
||||
'punctuation': /^(?:-+|\*+|_+|=+)|(?:-+|\*+|_+|=+)$/
|
||||
// See rest below
|
||||
}
|
||||
},
|
||||
|
||||
// list-punctuation and list-label must appear before indented-block
|
||||
'list-punctuation': {
|
||||
pattern: /(^[ \t]*)(?:-|\*{1,5}|\.{1,5}|(?:[a-z]|\d+)\.|[xvi]+\))(?= )/im,
|
||||
lookbehind: true,
|
||||
alias: 'punctuation'
|
||||
},
|
||||
'list-label': {
|
||||
pattern: /(^[ \t]*)[a-z\d].+(?::{2,4}|;;)(?=\s)/im,
|
||||
lookbehind: true,
|
||||
alias: 'symbol'
|
||||
},
|
||||
'indented-block': {
|
||||
pattern: /((\r?\n|\r)\2)([ \t]+)\S.*(?:(?:\r?\n|\r)\3.+)*(?=\2{2}|$)/,
|
||||
lookbehind: true
|
||||
},
|
||||
|
||||
'comment': /^\/\/.*/m,
|
||||
'title': {
|
||||
pattern: /^.+(?:\r?\n|\r)(?:={3,}|-{3,}|~{3,}|\^{3,}|\+{3,})$|^={1,5} +.+|^\.(?![\s.]).*/m,
|
||||
alias: 'important',
|
||||
inside: {
|
||||
'punctuation': /^(?:\.|=+)|(?:=+|-+|~+|\^+|\++)$/
|
||||
// See rest below
|
||||
}
|
||||
},
|
||||
'attribute-entry': {
|
||||
pattern: /^:[^:\r\n]+:(?: .*?(?: \+(?:\r?\n|\r).*?)*)?$/m,
|
||||
alias: 'tag'
|
||||
},
|
||||
'attributes': attributes,
|
||||
'hr': {
|
||||
pattern: /^'{3,}$/m,
|
||||
alias: 'punctuation'
|
||||
},
|
||||
'page-break': {
|
||||
pattern: /^<{3,}$/m,
|
||||
alias: 'punctuation'
|
||||
},
|
||||
'admonition': {
|
||||
pattern: /^(?:TIP|NOTE|IMPORTANT|WARNING|CAUTION):/m,
|
||||
alias: 'keyword'
|
||||
},
|
||||
'callout': [
|
||||
{
|
||||
pattern: /(^[ \t]*)<?\d*>/m,
|
||||
lookbehind: true,
|
||||
alias: 'symbol'
|
||||
},
|
||||
{
|
||||
pattern: /<\d+>/,
|
||||
alias: 'symbol'
|
||||
}
|
||||
],
|
||||
'macro': {
|
||||
pattern: /\b[a-z\d][a-z\d-]*::?(?:(?:\S+)??\[(?:[^\]\\"]|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/,
|
||||
inside: {
|
||||
'function': /^[a-z\d-]+(?=:)/,
|
||||
'punctuation': /^::?/,
|
||||
'attributes': {
|
||||
pattern: /(?:\[(?:[^\]\\"]|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/,
|
||||
inside: attributes.inside
|
||||
}
|
||||
}
|
||||
},
|
||||
'inline': {
|
||||
/*
|
||||
The initial look-behind prevents the highlighting of escaped quoted text.
|
||||
|
||||
Quoted text can be multi-line but cannot span an empty line.
|
||||
All quoted text can have attributes before [foobar, 'foobar', baz="bar"].
|
||||
|
||||
First, we handle the constrained quotes.
|
||||
Those must be bounded by non-word chars and cannot have spaces between the delimiter and the first char.
|
||||
They are, in order: _emphasis_, ``double quotes'', `single quotes', `monospace`, 'emphasis', *strong*, +monospace+ and #unquoted#
|
||||
|
||||
Then we handle the unconstrained quotes.
|
||||
Those do not have the restrictions of the constrained quotes.
|
||||
They are, in order: __emphasis__, **strong**, ++monospace++, +++passthrough+++, ##unquoted##, $$passthrough$$, ~subscript~, ^superscript^, {attribute-reference}, [[anchor]], [[[bibliography anchor]]], <<xref>>, (((indexes))) and ((indexes))
|
||||
*/
|
||||
pattern: /(^|[^\\])(?:(?:\B\[(?:[^\]\\"]|(["'])(?:(?!\2)[^\\]|\\.)*\2|\\.)*\])?(?:\b_(?!\s)(?: _|[^_\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: _|[^_\\\r\n]|\\.)+)*_\b|\B``(?!\s).+?(?:(?:\r?\n|\r).+?)*''\B|\B`(?!\s)(?: ['`]|.)+?(?:(?:\r?\n|\r)(?: ['`]|.)+?)*['`]\B|\B(['*+#])(?!\s)(?: \3|(?!\3)[^\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: \3|(?!\3)[^\\\r\n]|\\.)+)*\3\B)|(?:\[(?:[^\]\\"]|(["'])(?:(?!\4)[^\\]|\\.)*\4|\\.)*\])?(?:(__|\*\*|\+\+\+?|##|\$\$|[~^]).+?(?:(?:\r?\n|\r).+?)*\5|\{[^}\r\n]+\}|\[\[\[?.+?(?:(?:\r?\n|\r).+?)*\]?\]\]|<<.+?(?:(?:\r?\n|\r).+?)*>>|\(\(\(?.+?(?:(?:\r?\n|\r).+?)*\)?\)\)))/m,
|
||||
lookbehind: true,
|
||||
inside: {
|
||||
'attributes': attributes,
|
||||
'url': {
|
||||
pattern: /^(?:\[\[\[?.+?\]?\]\]|<<.+?>>)$/,
|
||||
inside: {
|
||||
'punctuation': /^(?:\[\[\[?|<<)|(?:\]\]\]?|>>)$/
|
||||
}
|
||||
},
|
||||
'attribute-ref': {
|
||||
pattern: /^\{.+\}$/,
|
||||
inside: {
|
||||
'variable': {
|
||||
pattern: /(^\{)[a-z\d,+_-]+/,
|
||||
lookbehind: true
|
||||
},
|
||||
'operator': /^[=?!#%@$]|!(?=[:}])/,
|
||||
'punctuation': /^\{|\}$|::?/
|
||||
}
|
||||
},
|
||||
'italic': {
|
||||
pattern: /^(['_])[\s\S]+\1$/,
|
||||
inside: {
|
||||
'punctuation': /^(?:''?|__?)|(?:''?|__?)$/
|
||||
}
|
||||
},
|
||||
'bold': {
|
||||
pattern: /^\*[\s\S]+\*$/,
|
||||
inside: {
|
||||
punctuation: /^\*\*?|\*\*?$/
|
||||
}
|
||||
},
|
||||
'punctuation': /^(?:``?|\+{1,3}|##?|\$\$|[~^]|\(\(\(?)|(?:''?|\+{1,3}|##?|\$\$|[~^`]|\)?\)\))$/
|
||||
}
|
||||
},
|
||||
'replacement': {
|
||||
pattern: /\((?:C|TM|R)\)/,
|
||||
alias: 'builtin'
|
||||
},
|
||||
'entity': /&#?[\da-z]{1,8};/i,
|
||||
'line-continuation': {
|
||||
pattern: /(^| )\+$/m,
|
||||
lookbehind: true,
|
||||
alias: 'punctuation'
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// Allow some nesting. There is no recursion though, so cloning should not be needed.
|
||||
|
||||
attributes.inside['interpreted'].inside.rest = {
|
||||
'macro': Prism.languages.asciidoc['macro'],
|
||||
'inline': Prism.languages.asciidoc['inline'],
|
||||
'replacement': Prism.languages.asciidoc['replacement'],
|
||||
'entity': Prism.languages.asciidoc['entity']
|
||||
};
|
||||
|
||||
Prism.languages.asciidoc['passthrough-block'].inside.rest = {
|
||||
'macro': Prism.languages.asciidoc['macro']
|
||||
};
|
||||
|
||||
Prism.languages.asciidoc['literal-block'].inside.rest = {
|
||||
'callout': Prism.languages.asciidoc['callout']
|
||||
};
|
||||
|
||||
Prism.languages.asciidoc['table'].inside.rest = {
|
||||
'comment-block': Prism.languages.asciidoc['comment-block'],
|
||||
'passthrough-block': Prism.languages.asciidoc['passthrough-block'],
|
||||
'literal-block': Prism.languages.asciidoc['literal-block'],
|
||||
'other-block': Prism.languages.asciidoc['other-block'],
|
||||
'list-punctuation': Prism.languages.asciidoc['list-punctuation'],
|
||||
'indented-block': Prism.languages.asciidoc['indented-block'],
|
||||
'comment': Prism.languages.asciidoc['comment'],
|
||||
'title': Prism.languages.asciidoc['title'],
|
||||
'attribute-entry': Prism.languages.asciidoc['attribute-entry'],
|
||||
'attributes': Prism.languages.asciidoc['attributes'],
|
||||
'hr': Prism.languages.asciidoc['hr'],
|
||||
'page-break': Prism.languages.asciidoc['page-break'],
|
||||
'admonition': Prism.languages.asciidoc['admonition'],
|
||||
'list-label': Prism.languages.asciidoc['list-label'],
|
||||
'callout': Prism.languages.asciidoc['callout'],
|
||||
'macro': Prism.languages.asciidoc['macro'],
|
||||
'inline': Prism.languages.asciidoc['inline'],
|
||||
'replacement': Prism.languages.asciidoc['replacement'],
|
||||
'entity': Prism.languages.asciidoc['entity'],
|
||||
'line-continuation': Prism.languages.asciidoc['line-continuation']
|
||||
};
|
||||
|
||||
Prism.languages.asciidoc['other-block'].inside.rest = {
|
||||
'table': Prism.languages.asciidoc['table'],
|
||||
'list-punctuation': Prism.languages.asciidoc['list-punctuation'],
|
||||
'indented-block': Prism.languages.asciidoc['indented-block'],
|
||||
'comment': Prism.languages.asciidoc['comment'],
|
||||
'attribute-entry': Prism.languages.asciidoc['attribute-entry'],
|
||||
'attributes': Prism.languages.asciidoc['attributes'],
|
||||
'hr': Prism.languages.asciidoc['hr'],
|
||||
'page-break': Prism.languages.asciidoc['page-break'],
|
||||
'admonition': Prism.languages.asciidoc['admonition'],
|
||||
'list-label': Prism.languages.asciidoc['list-label'],
|
||||
'macro': Prism.languages.asciidoc['macro'],
|
||||
'inline': Prism.languages.asciidoc['inline'],
|
||||
'replacement': Prism.languages.asciidoc['replacement'],
|
||||
'entity': Prism.languages.asciidoc['entity'],
|
||||
'line-continuation': Prism.languages.asciidoc['line-continuation']
|
||||
};
|
||||
|
||||
Prism.languages.asciidoc['title'].inside.rest = {
|
||||
'macro': Prism.languages.asciidoc['macro'],
|
||||
'inline': Prism.languages.asciidoc['inline'],
|
||||
'replacement': Prism.languages.asciidoc['replacement'],
|
||||
'entity': Prism.languages.asciidoc['entity']
|
||||
};
|
||||
|
||||
// Plugin to make entity title show the real entity, idea by Roman Komarov
|
||||
Prism.hooks.add('wrap', function(env) {
|
||||
if (env.type === 'entity') {
|
||||
env.attributes['title'] = env.content.replace(/&/, '&');
|
||||
}
|
||||
});
|
||||
}(Prism));
|
1
assets/js/components/prism-asciidoc.min.js
vendored
Normal file
1
assets/js/components/prism-asciidoc.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
36
assets/js/components/prism-aspnet.js
Normal file
36
assets/js/components/prism-aspnet.js
Normal file
|
@ -0,0 +1,36 @@
|
|||
Prism.languages.aspnet = Prism.languages.extend('markup', {
|
||||
'page-directive tag': {
|
||||
pattern: /<%\s*@.*%>/i,
|
||||
inside: {
|
||||
'page-directive tag': /<%\s*@\s*(?:Assembly|Control|Implements|Import|Master(?:Type)?|OutputCache|Page|PreviousPageType|Reference|Register)?|%>/i,
|
||||
rest: Prism.languages.markup.tag.inside
|
||||
}
|
||||
},
|
||||
'directive tag': {
|
||||
pattern: /<%.*%>/i,
|
||||
inside: {
|
||||
'directive tag': /<%\s*?[$=%#:]{0,2}|%>/i,
|
||||
rest: Prism.languages.csharp
|
||||
}
|
||||
}
|
||||
});
|
||||
// Regexp copied from prism-markup, with a negative look-ahead added
|
||||
Prism.languages.aspnet.tag.pattern = /<(?!%)\/?[^\s>\/]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\\1|\\?(?!\1)[\s\S])*\1|[^\s'">=]+))?)*\s*\/?>/i;
|
||||
|
||||
// match directives of attribute value foo="<% Bar %>"
|
||||
Prism.languages.insertBefore('inside', 'punctuation', {
|
||||
'directive tag': Prism.languages.aspnet['directive tag']
|
||||
}, Prism.languages.aspnet.tag.inside["attr-value"]);
|
||||
|
||||
Prism.languages.insertBefore('aspnet', 'comment', {
|
||||
'asp comment': /<%--[\s\S]*?--%>/
|
||||
});
|
||||
|
||||
// script runat="server" contains csharp, not javascript
|
||||
Prism.languages.insertBefore('aspnet', Prism.languages.javascript ? 'script' : 'tag', {
|
||||
'asp script': {
|
||||
pattern: /(<script(?=.*runat=['"]?server['"]?)[\s\S]*?>)[\s\S]*?(?=<\/script>)/i,
|
||||
lookbehind: true,
|
||||
inside: Prism.languages.csharp || {}
|
||||
}
|
||||
});
|
1
assets/js/components/prism-aspnet.min.js
vendored
Normal file
1
assets/js/components/prism-aspnet.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
Prism.languages.aspnet=Prism.languages.extend("markup",{"page-directive tag":{pattern:/<%\s*@.*%>/i,inside:{"page-directive tag":/<%\s*@\s*(?:Assembly|Control|Implements|Import|Master(?:Type)?|OutputCache|Page|PreviousPageType|Reference|Register)?|%>/i,rest:Prism.languages.markup.tag.inside}},"directive tag":{pattern:/<%.*%>/i,inside:{"directive tag":/<%\s*?[$=%#:]{0,2}|%>/i,rest:Prism.languages.csharp}}}),Prism.languages.aspnet.tag.pattern=/<(?!%)\/?[^\s>\/]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\\1|\\?(?!\1)[\s\S])*\1|[^\s'">=]+))?)*\s*\/?>/i,Prism.languages.insertBefore("inside","punctuation",{"directive tag":Prism.languages.aspnet["directive tag"]},Prism.languages.aspnet.tag.inside["attr-value"]),Prism.languages.insertBefore("aspnet","comment",{"asp comment":/<%--[\s\S]*?--%>/}),Prism.languages.insertBefore("aspnet",Prism.languages.javascript?"script":"tag",{"asp script":{pattern:/(<script(?=.*runat=['"]?server['"]?)[\s\S]*?>)[\s\S]*?(?=<\/script>)/i,lookbehind:!0,inside:Prism.languages.csharp||{}}});
|
27
assets/js/components/prism-autohotkey.js
Normal file
27
assets/js/components/prism-autohotkey.js
Normal file
|
@ -0,0 +1,27 @@
|
|||
// NOTES - follows first-first highlight method, block is locked after highlight, different from SyntaxHl
|
||||
Prism.languages.autohotkey= {
|
||||
'comment': {
|
||||
pattern: /(^[^";\n]*("[^"\n]*?"[^"\n]*?)*)(;.*$|^\s*\/\*[\s\S]*\n\*\/)/m,
|
||||
lookbehind: true
|
||||
},
|
||||
'string': /"(([^"\n\r]|"")*)"/m,
|
||||
'function': /[^\(\); \t,\n\+\*\-=\?>:\\\/<&%\[\]]+?(?=\()/m, //function - don't use .*\) in the end bcoz string locks it
|
||||
'tag': /^[ \t]*[^\s:]+?(?=:(?:[^:]|$))/m, //labels
|
||||
'variable': /%\w+%/,
|
||||
'number': /\b-?(0x[\dA-Fa-f]+|\d*\.?\d+([Ee]-?\d+)?)\b/,
|
||||
'operator': /\?|\/\/?=?|:=|\|[=|]?|&[=&]?|\+[=+]?|-[=-]?|\*[=*]?|<(?:<=?|>|=)?|>>?=?|[.^!=~]=?|\b(?:AND|NOT|OR)\b/,
|
||||
'punctuation': /[\{}[\]\(\):,]/,
|
||||
'boolean': /\b(true|false)\b/,
|
||||
|
||||
'selector': /\b(AutoTrim|BlockInput|Break|Click|ClipWait|Continue|Control|ControlClick|ControlFocus|ControlGet|ControlGetFocus|ControlGetPos|ControlGetText|ControlMove|ControlSend|ControlSendRaw|ControlSetText|CoordMode|Critical|DetectHiddenText|DetectHiddenWindows|Drive|DriveGet|DriveSpaceFree|EnvAdd|EnvDiv|EnvGet|EnvMult|EnvSet|EnvSub|EnvUpdate|Exit|ExitApp|FileAppend|FileCopy|FileCopyDir|FileCreateDir|FileCreateShortcut|FileDelete|FileEncoding|FileGetAttrib|FileGetShortcut|FileGetSize|FileGetTime|FileGetVersion|FileInstall|FileMove|FileMoveDir|FileRead|FileReadLine|FileRecycle|FileRecycleEmpty|FileRemoveDir|FileSelectFile|FileSelectFolder|FileSetAttrib|FileSetTime|FormatTime|GetKeyState|Gosub|Goto|GroupActivate|GroupAdd|GroupClose|GroupDeactivate|Gui|GuiControl|GuiControlGet|Hotkey|ImageSearch|IniDelete|IniRead|IniWrite|Input|InputBox|KeyWait|ListHotkeys|ListLines|ListVars|Loop|Menu|MouseClick|MouseClickDrag|MouseGetPos|MouseMove|MsgBox|OnExit|OutputDebug|Pause|PixelGetColor|PixelSearch|PostMessage|Process|Progress|Random|RegDelete|RegRead|RegWrite|Reload|Repeat|Return|Run|RunAs|RunWait|Send|SendEvent|SendInput|SendMessage|SendMode|SendPlay|SendRaw|SetBatchLines|SetCapslockState|SetControlDelay|SetDefaultMouseSpeed|SetEnv|SetFormat|SetKeyDelay|SetMouseDelay|SetNumlockState|SetScrollLockState|SetStoreCapslockMode|SetTimer|SetTitleMatchMode|SetWinDelay|SetWorkingDir|Shutdown|Sleep|Sort|SoundBeep|SoundGet|SoundGetWaveVolume|SoundPlay|SoundSet|SoundSetWaveVolume|SplashImage|SplashTextOff|SplashTextOn|SplitPath|StatusBarGetText|StatusBarWait|StringCaseSense|StringGetPos|StringLeft|StringLen|StringLower|StringMid|StringReplace|StringRight|StringSplit|StringTrimLeft|StringTrimRight|StringUpper|Suspend|SysGet|Thread|ToolTip|Transform|TrayTip|URLDownloadToFile|WinActivate|WinActivateBottom|WinClose|WinGet|WinGetActiveStats|WinGetActiveTitle|WinGetClass|WinGetPos|WinGetText|WinGetTitle|WinHide|WinKill|WinMaximize|WinMenuSelectItem|WinMinimize|WinMinimizeAll|WinMinimizeAllUndo|WinMove|WinRestore|WinSet|WinSetTitle|WinShow|WinWait|WinWaitActive|WinWaitClose|WinWaitNotActive)\b/i,
|
||||
|
||||
'constant': /\b(a_ahkpath|a_ahkversion|a_appdata|a_appdatacommon|a_autotrim|a_batchlines|a_caretx|a_carety|a_computername|a_controldelay|a_cursor|a_dd|a_ddd|a_dddd|a_defaultmousespeed|a_desktop|a_desktopcommon|a_detecthiddentext|a_detecthiddenwindows|a_endchar|a_eventinfo|a_exitreason|a_formatfloat|a_formatinteger|a_gui|a_guievent|a_guicontrol|a_guicontrolevent|a_guiheight|a_guiwidth|a_guix|a_guiy|a_hour|a_iconfile|a_iconhidden|a_iconnumber|a_icontip|a_index|a_ipaddress1|a_ipaddress2|a_ipaddress3|a_ipaddress4|a_isadmin|a_iscompiled|a_iscritical|a_ispaused|a_issuspended|a_isunicode|a_keydelay|a_language|a_lasterror|a_linefile|a_linenumber|a_loopfield|a_loopfileattrib|a_loopfiledir|a_loopfileext|a_loopfilefullpath|a_loopfilelongpath|a_loopfilename|a_loopfileshortname|a_loopfileshortpath|a_loopfilesize|a_loopfilesizekb|a_loopfilesizemb|a_loopfiletimeaccessed|a_loopfiletimecreated|a_loopfiletimemodified|a_loopreadline|a_loopregkey|a_loopregname|a_loopregsubkey|a_loopregtimemodified|a_loopregtype|a_mday|a_min|a_mm|a_mmm|a_mmmm|a_mon|a_mousedelay|a_msec|a_mydocuments|a_now|a_nowutc|a_numbatchlines|a_ostype|a_osversion|a_priorhotkey|programfiles|a_programfiles|a_programs|a_programscommon|a_screenheight|a_screenwidth|a_scriptdir|a_scriptfullpath|a_scriptname|a_sec|a_space|a_startmenu|a_startmenucommon|a_startup|a_startupcommon|a_stringcasesense|a_tab|a_temp|a_thisfunc|a_thishotkey|a_thislabel|a_thismenu|a_thismenuitem|a_thismenuitempos|a_tickcount|a_timeidle|a_timeidlephysical|a_timesincepriorhotkey|a_timesincethishotkey|a_titlematchmode|a_titlematchmodespeed|a_username|a_wday|a_windelay|a_windir|a_workingdir|a_yday|a_year|a_yweek|a_yyyy|clipboard|clipboardall|comspec|errorlevel)\b/i,
|
||||
|
||||
'builtin': /\b(abs|acos|asc|asin|atan|ceil|chr|class|cos|dllcall|exp|fileexist|Fileopen|floor|il_add|il_create|il_destroy|instr|substr|isfunc|islabel|IsObject|ln|log|lv_add|lv_delete|lv_deletecol|lv_getcount|lv_getnext|lv_gettext|lv_insert|lv_insertcol|lv_modify|lv_modifycol|lv_setimagelist|mod|onmessage|numget|numput|registercallback|regexmatch|regexreplace|round|sin|tan|sqrt|strlen|sb_seticon|sb_setparts|sb_settext|strsplit|tv_add|tv_delete|tv_getchild|tv_getcount|tv_getnext|tv_get|tv_getparent|tv_getprev|tv_getselection|tv_gettext|tv_modify|varsetcapacity|winactive|winexist|__New|__Call|__Get|__Set)\b/i,
|
||||
|
||||
'symbol': /\b(alt|altdown|altup|appskey|backspace|browser_back|browser_favorites|browser_forward|browser_home|browser_refresh|browser_search|browser_stop|bs|capslock|ctrl|ctrlbreak|ctrldown|ctrlup|del|delete|down|end|enter|esc|escape|f1|f10|f11|f12|f13|f14|f15|f16|f17|f18|f19|f2|f20|f21|f22|f23|f24|f3|f4|f5|f6|f7|f8|f9|home|ins|insert|joy1|joy10|joy11|joy12|joy13|joy14|joy15|joy16|joy17|joy18|joy19|joy2|joy20|joy21|joy22|joy23|joy24|joy25|joy26|joy27|joy28|joy29|joy3|joy30|joy31|joy32|joy4|joy5|joy6|joy7|joy8|joy9|joyaxes|joybuttons|joyinfo|joyname|joypov|joyr|joyu|joyv|joyx|joyy|joyz|lalt|launch_app1|launch_app2|launch_mail|launch_media|lbutton|lcontrol|lctrl|left|lshift|lwin|lwindown|lwinup|mbutton|media_next|media_play_pause|media_prev|media_stop|numlock|numpad0|numpad1|numpad2|numpad3|numpad4|numpad5|numpad6|numpad7|numpad8|numpad9|numpadadd|numpadclear|numpaddel|numpaddiv|numpaddot|numpaddown|numpadend|numpadenter|numpadhome|numpadins|numpadleft|numpadmult|numpadpgdn|numpadpgup|numpadright|numpadsub|numpadup|pgdn|pgup|printscreen|ralt|rbutton|rcontrol|rctrl|right|rshift|rwin|rwindown|rwinup|scrolllock|shift|shiftdown|shiftup|space|tab|up|volume_down|volume_mute|volume_up|wheeldown|wheelleft|wheelright|wheelup|xbutton1|xbutton2)\b/i,
|
||||
|
||||
'important': /#\b(AllowSameLineComments|ClipboardTimeout|CommentFlag|ErrorStdOut|EscapeChar|HotkeyInterval|HotkeyModifierTimeout|Hotstring|IfWinActive|IfWinExist|IfWinNotActive|IfWinNotExist|Include|IncludeAgain|InstallKeybdHook|InstallMouseHook|KeyHistory|LTrim|MaxHotkeysPerInterval|MaxMem|MaxThreads|MaxThreadsBuffer|MaxThreadsPerHotkey|NoEnv|NoTrayIcon|Persistent|SingleInstance|UseHook|WinActivateForce)\b/i,
|
||||
|
||||
'keyword': /\b(Abort|AboveNormal|Add|ahk_class|ahk_group|ahk_id|ahk_pid|All|Alnum|Alpha|AltSubmit|AltTab|AltTabAndMenu|AltTabMenu|AltTabMenuDismiss|AlwaysOnTop|AutoSize|Background|BackgroundTrans|BelowNormal|between|BitAnd|BitNot|BitOr|BitShiftLeft|BitShiftRight|BitXOr|Bold|Border|Button|ByRef|Checkbox|Checked|CheckedGray|Choose|ChooseString|Close|Color|ComboBox|Contains|ControlList|Count|Date|DateTime|Days|DDL|Default|DeleteAll|Delimiter|Deref|Destroy|Digit|Disable|Disabled|DropDownList|Edit|Eject|Else|Enable|Enabled|Error|Exist|Expand|ExStyle|FileSystem|First|Flash|Float|FloatFast|Focus|Font|for|global|Grid|Group|GroupBox|GuiClose|GuiContextMenu|GuiDropFiles|GuiEscape|GuiSize|Hdr|Hidden|Hide|High|HKCC|HKCR|HKCU|HKEY_CLASSES_ROOT|HKEY_CURRENT_CONFIG|HKEY_CURRENT_USER|HKEY_LOCAL_MACHINE|HKEY_USERS|HKLM|HKU|Hours|HScroll|Icon|IconSmall|ID|IDLast|If|IfEqual|IfExist|IfGreater|IfGreaterOrEqual|IfInString|IfLess|IfLessOrEqual|IfMsgBox|IfNotEqual|IfNotExist|IfNotInString|IfWinActive|IfWinExist|IfWinNotActive|IfWinNotExist|Ignore|ImageList|in|Integer|IntegerFast|Interrupt|is|italic|Join|Label|LastFound|LastFoundExist|Limit|Lines|List|ListBox|ListView|local|Lock|Logoff|Low|Lower|Lowercase|MainWindow|Margin|Maximize|MaximizeBox|MaxSize|Minimize|MinimizeBox|MinMax|MinSize|Minutes|MonthCal|Mouse|Move|Multi|NA|No|NoActivate|NoDefault|NoHide|NoIcon|NoMainWindow|norm|Normal|NoSort|NoSortHdr|NoStandard|Not|NoTab|NoTimers|Number|Off|Ok|On|OwnDialogs|Owner|Parse|Password|Picture|Pixel|Pos|Pow|Priority|ProcessName|Radio|Range|Read|ReadOnly|Realtime|Redraw|REG_BINARY|REG_DWORD|REG_EXPAND_SZ|REG_MULTI_SZ|REG_SZ|Region|Relative|Rename|Report|Resize|Restore|Retry|RGB|Screen|Seconds|Section|Serial|SetLabel|ShiftAltTab|Show|Single|Slider|SortDesc|Standard|static|Status|StatusBar|StatusCD|strike|Style|Submit|SysMenu|Tab2|TabStop|Text|Theme|Tile|ToggleCheck|ToggleEnable|ToolWindow|Top|Topmost|TransColor|Transparent|Tray|TreeView|TryAgain|Type|UnCheck|underline|Unicode|Unlock|UpDown|Upper|Uppercase|UseErrorLevel|Vis|VisFirst|Visible|VScroll|Wait|WaitClose|WantCtrlA|WantF2|WantReturn|While|Wrap|Xdigit|xm|xp|xs|Yes|ym|yp|ys)\b/i
|
||||
};
|
1
assets/js/components/prism-autohotkey.min.js
vendored
Normal file
1
assets/js/components/prism-autohotkey.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
34
assets/js/components/prism-autoit.js
Normal file
34
assets/js/components/prism-autoit.js
Normal file
|
@ -0,0 +1,34 @@
|
|||
Prism.languages.autoit = {
|
||||
"comment": [
|
||||
/;.*/,
|
||||
{
|
||||
// The multi-line comments delimiters can actually be commented out with ";"
|
||||
pattern: /(^\s*)#(?:comments-start|cs)[\s\S]*?^\s*#(?:comments-end|ce)/m,
|
||||
lookbehind: true
|
||||
}
|
||||
],
|
||||
"url": {
|
||||
pattern: /(^\s*#include\s+)(?:<[^\r\n>]+>|"[^\r\n"]+")/m,
|
||||
lookbehind: true
|
||||
},
|
||||
"string": {
|
||||
pattern: /(["'])(?:\1\1|(?!\1)[^\r\n])*\1/,
|
||||
greedy: true,
|
||||
inside: {
|
||||
"variable": /([%$@])\w+\1/
|
||||
}
|
||||
},
|
||||
"directive": {
|
||||
pattern: /(^\s*)#\w+/m,
|
||||
lookbehind: true,
|
||||
alias: 'keyword'
|
||||
},
|
||||
"function": /\b\w+(?=\()/,
|
||||
// Variables and macros
|
||||
"variable": /[$@]\w+/,
|
||||
"keyword": /\b(?:Case|Const|Continue(?:Case|Loop)|Default|Dim|Do|Else(?:If)?|End(?:Func|If|Select|Switch|With)|Enum|Exit(?:Loop)?|For|Func|Global|If|In|Local|Next|Null|ReDim|Select|Static|Step|Switch|Then|To|Until|Volatile|WEnd|While|With)\b/i,
|
||||
"number": /\b(?:0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/i,
|
||||
"boolean": /\b(?:True|False)\b/i,
|
||||
"operator": /<[=>]?|[-+*\/=&>]=?|[?^]|\b(?:And|Or|Not)\b/i,
|
||||
"punctuation": /[\[\]().,:]/
|
||||
};
|
1
assets/js/components/prism-autoit.min.js
vendored
Normal file
1
assets/js/components/prism-autoit.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
Prism.languages.autoit={comment:[/;.*/,{pattern:/(^\s*)#(?:comments-start|cs)[\s\S]*?^\s*#(?:comments-end|ce)/m,lookbehind:!0}],url:{pattern:/(^\s*#include\s+)(?:<[^\r\n>]+>|"[^\r\n"]+")/m,lookbehind:!0},string:{pattern:/(["'])(?:\1\1|(?!\1)[^\r\n])*\1/,greedy:!0,inside:{variable:/([%$@])\w+\1/}},directive:{pattern:/(^\s*)#\w+/m,lookbehind:!0,alias:"keyword"},"function":/\b\w+(?=\()/,variable:/[$@]\w+/,keyword:/\b(?:Case|Const|Continue(?:Case|Loop)|Default|Dim|Do|Else(?:If)?|End(?:Func|If|Select|Switch|With)|Enum|Exit(?:Loop)?|For|Func|Global|If|In|Local|Next|Null|ReDim|Select|Static|Step|Switch|Then|To|Until|Volatile|WEnd|While|With)\b/i,number:/\b(?:0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/i,"boolean":/\b(?:True|False)\b/i,operator:/<[=>]?|[-+*\/=&>]=?|[?^]|\b(?:And|Or|Not)\b/i,punctuation:/[\[\]().,:]/};
|
80
assets/js/components/prism-bash.js
Normal file
80
assets/js/components/prism-bash.js
Normal file
|
@ -0,0 +1,80 @@
|
|||
(function(Prism) {
|
||||
var insideString = {
|
||||
variable: [
|
||||
// Arithmetic Environment
|
||||
{
|
||||
pattern: /\$?\(\([\s\S]+?\)\)/,
|
||||
inside: {
|
||||
// If there is a $ sign at the beginning highlight $(( and )) as variable
|
||||
variable: [{
|
||||
pattern: /(^\$\(\([\s\S]+)\)\)/,
|
||||
lookbehind: true
|
||||
},
|
||||
/^\$\(\(/,
|
||||
],
|
||||
number: /\b-?(?:0x[\dA-Fa-f]+|\d*\.?\d+(?:[Ee]-?\d+)?)\b/,
|
||||
// Operators according to https://www.gnu.org/software/bash/manual/bashref.html#Shell-Arithmetic
|
||||
operator: /--?|-=|\+\+?|\+=|!=?|~|\*\*?|\*=|\/=?|%=?|<<=?|>>=?|<=?|>=?|==?|&&?|&=|\^=?|\|\|?|\|=|\?|:/,
|
||||
// If there is no $ sign at the beginning highlight (( and )) as punctuation
|
||||
punctuation: /\(\(?|\)\)?|,|;/
|
||||
}
|
||||
},
|
||||
// Command Substitution
|
||||
{
|
||||
pattern: /\$\([^)]+\)|`[^`]+`/,
|
||||
inside: {
|
||||
variable: /^\$\(|^`|\)$|`$/
|
||||
}
|
||||
},
|
||||
/\$(?:[a-z0-9_#\?\*!@]+|\{[^}]+\})/i
|
||||
],
|
||||
};
|
||||
|
||||
Prism.languages.bash = {
|
||||
'shebang': {
|
||||
pattern: /^#!\s*\/bin\/bash|^#!\s*\/bin\/sh/,
|
||||
alias: 'important'
|
||||
},
|
||||
'comment': {
|
||||
pattern: /(^|[^"{\\])#.*/,
|
||||
lookbehind: true
|
||||
},
|
||||
'string': [
|
||||
//Support for Here-Documents https://en.wikipedia.org/wiki/Here_document
|
||||
{
|
||||
pattern: /((?:^|[^<])<<\s*)(?:"|')?(\w+?)(?:"|')?\s*\r?\n(?:[\s\S])*?\r?\n\2/g,
|
||||
lookbehind: true,
|
||||
greedy: true,
|
||||
inside: insideString
|
||||
},
|
||||
{
|
||||
pattern: /(["'])(?:\\\\|\\?[^\\])*?\1/g,
|
||||
greedy: true,
|
||||
inside: insideString
|
||||
}
|
||||
],
|
||||
'variable': insideString.variable,
|
||||
// Originally based on http://ss64.com/bash/
|
||||
'function': {
|
||||
pattern: /(^|\s|;|\||&)(?:alias|apropos|apt-get|aptitude|aspell|awk|basename|bash|bc|bg|builtin|bzip2|cal|cat|cd|cfdisk|chgrp|chmod|chown|chroot|chkconfig|cksum|clear|cmp|comm|command|cp|cron|crontab|csplit|cut|date|dc|dd|ddrescue|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|enable|env|ethtool|eval|exec|expand|expect|export|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|getopts|git|grep|groupadd|groupdel|groupmod|groups|gzip|hash|head|help|hg|history|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|jobs|join|kill|killall|less|link|ln|locate|logname|logout|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|make|man|mkdir|mkfifo|mkisofs|mknod|more|most|mount|mtools|mtr|mv|mmv|nano|netstat|nice|nl|nohup|notify-send|npm|nslookup|open|op|passwd|paste|pathchk|ping|pkill|popd|pr|printcap|printenv|printf|ps|pushd|pv|pwd|quota|quotacheck|quotactl|ram|rar|rcp|read|readarray|readonly|reboot|rename|renice|remsync|rev|rm|rmdir|rsync|screen|scp|sdiff|sed|seq|service|sftp|shift|shopt|shutdown|sleep|slocate|sort|source|split|ssh|stat|strace|su|sudo|sum|suspend|sync|tail|tar|tee|test|time|timeout|times|touch|top|traceroute|trap|tr|tsort|tty|type|ulimit|umask|umount|unalias|uname|unexpand|uniq|units|unrar|unshar|uptime|useradd|userdel|usermod|users|uuencode|uudecode|v|vdir|vi|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yes|zip)(?=$|\s|;|\||&)/,
|
||||
lookbehind: true
|
||||
},
|
||||
'keyword': {
|
||||
pattern: /(^|\s|;|\||&)(?:let|:|\.|if|then|else|elif|fi|for|break|continue|while|in|case|function|select|do|done|until|echo|exit|return|set|declare)(?=$|\s|;|\||&)/,
|
||||
lookbehind: true
|
||||
},
|
||||
'boolean': {
|
||||
pattern: /(^|\s|;|\||&)(?:true|false)(?=$|\s|;|\||&)/,
|
||||
lookbehind: true
|
||||
},
|
||||
'operator': /&&?|\|\|?|==?|!=?|<<<?|>>|<=?|>=?|=~/,
|
||||
'punctuation': /\$?\(\(?|\)\)?|\.\.|[{}[\];]/
|
||||
};
|
||||
|
||||
var inside = insideString.variable[1].inside;
|
||||
inside['function'] = Prism.languages.bash['function'];
|
||||
inside.keyword = Prism.languages.bash.keyword;
|
||||
inside.boolean = Prism.languages.bash.boolean;
|
||||
inside.operator = Prism.languages.bash.operator;
|
||||
inside.punctuation = Prism.languages.bash.punctuation;
|
||||
})(Prism);
|
1
assets/js/components/prism-bash.min.js
vendored
Normal file
1
assets/js/components/prism-bash.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
!function(e){var t={variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b-?(?:0x[\dA-Fa-f]+|\d*\.?\d+(?:[Ee]-?\d+)?)\b/,operator:/--?|-=|\+\+?|\+=|!=?|~|\*\*?|\*=|\/=?|%=?|<<=?|>>=?|<=?|>=?|==?|&&?|&=|\^=?|\|\|?|\|=|\?|:/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\([^)]+\)|`[^`]+`/,inside:{variable:/^\$\(|^`|\)$|`$/}},/\$(?:[a-z0-9_#\?\*!@]+|\{[^}]+\})/i]};e.languages.bash={shebang:{pattern:/^#!\s*\/bin\/bash|^#!\s*\/bin\/sh/,alias:"important"},comment:{pattern:/(^|[^"{\\])#.*/,lookbehind:!0},string:[{pattern:/((?:^|[^<])<<\s*)(?:"|')?(\w+?)(?:"|')?\s*\r?\n(?:[\s\S])*?\r?\n\2/g,lookbehind:!0,greedy:!0,inside:t},{pattern:/(["'])(?:\\\\|\\?[^\\])*?\1/g,greedy:!0,inside:t}],variable:t.variable,"function":{pattern:/(^|\s|;|\||&)(?:alias|apropos|apt-get|aptitude|aspell|awk|basename|bash|bc|bg|builtin|bzip2|cal|cat|cd|cfdisk|chgrp|chmod|chown|chroot|chkconfig|cksum|clear|cmp|comm|command|cp|cron|crontab|csplit|cut|date|dc|dd|ddrescue|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|enable|env|ethtool|eval|exec|expand|expect|export|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|getopts|git|grep|groupadd|groupdel|groupmod|groups|gzip|hash|head|help|hg|history|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|jobs|join|kill|killall|less|link|ln|locate|logname|logout|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|make|man|mkdir|mkfifo|mkisofs|mknod|more|most|mount|mtools|mtr|mv|mmv|nano|netstat|nice|nl|nohup|notify-send|npm|nslookup|open|op|passwd|paste|pathchk|ping|pkill|popd|pr|printcap|printenv|printf|ps|pushd|pv|pwd|quota|quotacheck|quotactl|ram|rar|rcp|read|readarray|readonly|reboot|rename|renice|remsync|rev|rm|rmdir|rsync|screen|scp|sdiff|sed|seq|service|sftp|shift|shopt|shutdown|sleep|slocate|sort|source|split|ssh|stat|strace|su|sudo|sum|suspend|sync|tail|tar|tee|test|time|timeout|times|touch|top|traceroute|trap|tr|tsort|tty|type|ulimit|umask|umount|unalias|uname|unexpand|uniq|units|unrar|unshar|uptime|useradd|userdel|usermod|users|uuencode|uudecode|v|vdir|vi|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yes|zip)(?=$|\s|;|\||&)/,lookbehind:!0},keyword:{pattern:/(^|\s|;|\||&)(?:let|:|\.|if|then|else|elif|fi|for|break|continue|while|in|case|function|select|do|done|until|echo|exit|return|set|declare)(?=$|\s|;|\||&)/,lookbehind:!0},"boolean":{pattern:/(^|\s|;|\||&)(?:true|false)(?=$|\s|;|\||&)/,lookbehind:!0},operator:/&&?|\|\|?|==?|!=?|<<<?|>>|<=?|>=?|=~/,punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];]/};var a=t.variable[1].inside;a["function"]=e.languages.bash["function"],a.keyword=e.languages.bash.keyword,a.boolean=e.languages.bash.boolean,a.operator=e.languages.bash.operator,a.punctuation=e.languages.bash.punctuation}(Prism);
|
14
assets/js/components/prism-basic.js
Normal file
14
assets/js/components/prism-basic.js
Normal file
|
@ -0,0 +1,14 @@
|
|||
Prism.languages.basic = {
|
||||
'string': /"(?:""|[!#$%&'()*,\/:;<=>?^_ +\-.A-Z\d])*"/i,
|
||||
'comment': {
|
||||
pattern: /(?:!|REM\b).+/i,
|
||||
inside: {
|
||||
'keyword': /^REM/i
|
||||
}
|
||||
},
|
||||
'number': /(?:\b|\B[.-])(?:\d+\.?\d*)(?:E[+-]?\d+)?/i,
|
||||
'keyword': /\b(?:AS|BEEP|BLOAD|BSAVE|CALL(?: ABSOLUTE)?|CASE|CHAIN|CHDIR|CLEAR|CLOSE|CLS|COM|COMMON|CONST|DATA|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DIM|DO|DOUBLE|ELSE|ELSEIF|END|ENVIRON|ERASE|ERROR|EXIT|FIELD|FILES|FOR|FUNCTION|GET|GOSUB|GOTO|IF|INPUT|INTEGER|IOCTL|KEY|KILL|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|MKDIR|NAME|NEXT|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPTION BASE|OUT|POKE|PUT|READ|REDIM|REM|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SHARED|SINGLE|SELECT CASE|SHELL|SLEEP|STATIC|STEP|STOP|STRING|SUB|SWAP|SYSTEM|THEN|TIMER|TO|TROFF|TRON|TYPE|UNLOCK|UNTIL|USING|VIEW PRINT|WAIT|WEND|WHILE|WRITE)(?:\$|\b)/i,
|
||||
'function': /\b(?:ABS|ACCESS|ACOS|ANGLE|AREA|ARITHMETIC|ARRAY|ASIN|ASK|AT|ATN|BASE|BEGIN|BREAK|CAUSE|CEIL|CHR|CLIP|COLLATE|COLOR|CON|COS|COSH|COT|CSC|DATE|DATUM|DEBUG|DECIMAL|DEF|DEG|DEGREES|DELETE|DET|DEVICE|DISPLAY|DOT|ELAPSED|EPS|ERASABLE|EXLINE|EXP|EXTERNAL|EXTYPE|FILETYPE|FIXED|FP|GO|GRAPH|HANDLER|IDN|IMAGE|IN|INT|INTERNAL|IP|IS|KEYED|LBOUND|LCASE|LEFT|LEN|LENGTH|LET|LINE|LINES|LOG|LOG10|LOG2|LTRIM|MARGIN|MAT|MAX|MAXNUM|MID|MIN|MISSING|MOD|NATIVE|NUL|NUMERIC|OF|OPTION|ORD|ORGANIZATION|OUTIN|OUTPUT|PI|POINT|POINTER|POINTS|POS|PRINT|PROGRAM|PROMPT|RAD|RADIANS|RANDOMIZE|RECORD|RECSIZE|RECTYPE|RELATIVE|REMAINDER|REPEAT|REST|RETRY|REWRITE|RIGHT|RND|ROUND|RTRIM|SAME|SEC|SELECT|SEQUENTIAL|SET|SETTER|SGN|SIN|SINH|SIZE|SKIP|SQR|STANDARD|STATUS|STR|STREAM|STYLE|TAB|TAN|TANH|TEMPLATE|TEXT|THERE|TIME|TIMEOUT|TRACE|TRANSFORM|TRUNCATE|UBOUND|UCASE|USE|VAL|VARIABLE|VIEWPORT|WHEN|WINDOW|WITH|ZER|ZONEWIDTH)(?:\$|\b)/i,
|
||||
'operator': /<[=>]?|>=?|[+\-*\/^=&]|\b(?:AND|EQV|IMP|NOT|OR|XOR)\b/i,
|
||||
'punctuation': /[,;:()]/
|
||||
};
|
1
assets/js/components/prism-basic.min.js
vendored
Normal file
1
assets/js/components/prism-basic.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
Prism.languages.basic={string:/"(?:""|[!#$%&'()*,\/:;<=>?^_ +\-.A-Z\d])*"/i,comment:{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},number:/(?:\b|\B[.-])(?:\d+\.?\d*)(?:E[+-]?\d+)?/i,keyword:/\b(?:AS|BEEP|BLOAD|BSAVE|CALL(?: ABSOLUTE)?|CASE|CHAIN|CHDIR|CLEAR|CLOSE|CLS|COM|COMMON|CONST|DATA|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DIM|DO|DOUBLE|ELSE|ELSEIF|END|ENVIRON|ERASE|ERROR|EXIT|FIELD|FILES|FOR|FUNCTION|GET|GOSUB|GOTO|IF|INPUT|INTEGER|IOCTL|KEY|KILL|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|MKDIR|NAME|NEXT|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPTION BASE|OUT|POKE|PUT|READ|REDIM|REM|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SHARED|SINGLE|SELECT CASE|SHELL|SLEEP|STATIC|STEP|STOP|STRING|SUB|SWAP|SYSTEM|THEN|TIMER|TO|TROFF|TRON|TYPE|UNLOCK|UNTIL|USING|VIEW PRINT|WAIT|WEND|WHILE|WRITE)(?:\$|\b)/i,"function":/\b(?:ABS|ACCESS|ACOS|ANGLE|AREA|ARITHMETIC|ARRAY|ASIN|ASK|AT|ATN|BASE|BEGIN|BREAK|CAUSE|CEIL|CHR|CLIP|COLLATE|COLOR|CON|COS|COSH|COT|CSC|DATE|DATUM|DEBUG|DECIMAL|DEF|DEG|DEGREES|DELETE|DET|DEVICE|DISPLAY|DOT|ELAPSED|EPS|ERASABLE|EXLINE|EXP|EXTERNAL|EXTYPE|FILETYPE|FIXED|FP|GO|GRAPH|HANDLER|IDN|IMAGE|IN|INT|INTERNAL|IP|IS|KEYED|LBOUND|LCASE|LEFT|LEN|LENGTH|LET|LINE|LINES|LOG|LOG10|LOG2|LTRIM|MARGIN|MAT|MAX|MAXNUM|MID|MIN|MISSING|MOD|NATIVE|NUL|NUMERIC|OF|OPTION|ORD|ORGANIZATION|OUTIN|OUTPUT|PI|POINT|POINTER|POINTS|POS|PRINT|PROGRAM|PROMPT|RAD|RADIANS|RANDOMIZE|RECORD|RECSIZE|RECTYPE|RELATIVE|REMAINDER|REPEAT|REST|RETRY|REWRITE|RIGHT|RND|ROUND|RTRIM|SAME|SEC|SELECT|SEQUENTIAL|SET|SETTER|SGN|SIN|SINH|SIZE|SKIP|SQR|STANDARD|STATUS|STR|STREAM|STYLE|TAB|TAN|TANH|TEMPLATE|TEXT|THERE|TIME|TIMEOUT|TRACE|TRANSFORM|TRUNCATE|UBOUND|UCASE|USE|VAL|VARIABLE|VIEWPORT|WHEN|WINDOW|WITH|ZER|ZONEWIDTH)(?:\$|\b)/i,operator:/<[=>]?|>=?|[+\-*\/^=&]|\b(?:AND|EQV|IMP|NOT|OR|XOR)\b/i,punctuation:/[,;:()]/};
|
99
assets/js/components/prism-batch.js
Normal file
99
assets/js/components/prism-batch.js
Normal file
|
@ -0,0 +1,99 @@
|
|||
(function (Prism) {
|
||||
var variable = /%%?[~:\w]+%?|!\S+!/;
|
||||
var parameter = {
|
||||
pattern: /\/[a-z?]+(?=[ :]|$):?|-[a-z]\b|--[a-z-]+\b/im,
|
||||
alias: 'attr-name',
|
||||
inside: {
|
||||
'punctuation': /:/
|
||||
}
|
||||
};
|
||||
var string = /"[^"]*"/;
|
||||
var number = /(?:\b|-)\d+\b/;
|
||||
|
||||
Prism.languages.batch = {
|
||||
'comment': [
|
||||
/^::.*/m,
|
||||
{
|
||||
pattern: /((?:^|[&(])[ \t]*)rem\b(?:[^^&)\r\n]|\^(?:\r\n|[\s\S]))*/im,
|
||||
lookbehind: true
|
||||
}
|
||||
],
|
||||
'label': {
|
||||
pattern: /^:.*/m,
|
||||
alias: 'property'
|
||||
},
|
||||
'command': [
|
||||
{
|
||||
// FOR command
|
||||
pattern: /((?:^|[&(])[ \t]*)for(?: ?\/[a-z?](?:[ :](?:"[^"]*"|\S+))?)* \S+ in \([^)]+\) do/im,
|
||||
lookbehind: true,
|
||||
inside: {
|
||||
'keyword': /^for\b|\b(?:in|do)\b/i,
|
||||
'string': string,
|
||||
'parameter': parameter,
|
||||
'variable': variable,
|
||||
'number': number,
|
||||
'punctuation': /[()',]/
|
||||
}
|
||||
},
|
||||
{
|
||||
// IF command
|
||||
pattern: /((?:^|[&(])[ \t]*)if(?: ?\/[a-z?](?:[ :](?:"[^"]*"|\S+))?)* (?:not )?(?:cmdextversion \d+|defined \w+|errorlevel \d+|exist \S+|(?:"[^"]*"|\S+)?(?:==| (?:equ|neq|lss|leq|gtr|geq) )(?:"[^"]*"|\S+))/im,
|
||||
lookbehind: true,
|
||||
inside: {
|
||||
'keyword': /^if\b|\b(?:not|cmdextversion|defined|errorlevel|exist)\b/i,
|
||||
'string': string,
|
||||
'parameter': parameter,
|
||||
'variable': variable,
|
||||
'number': number,
|
||||
'operator': /\^|==|\b(?:equ|neq|lss|leq|gtr|geq)\b/i
|
||||
}
|
||||
},
|
||||
{
|
||||
// ELSE command
|
||||
pattern: /((?:^|[&()])[ \t]*)else\b/im,
|
||||
lookbehind: true,
|
||||
inside: {
|
||||
'keyword': /^else\b/i
|
||||
}
|
||||
},
|
||||
{
|
||||
// SET command
|
||||
pattern: /((?:^|[&(])[ \t]*)set(?: ?\/[a-z](?:[ :](?:"[^"]*"|\S+))?)* (?:[^^&)\r\n]|\^(?:\r\n|[\s\S]))*/im,
|
||||
lookbehind: true,
|
||||
inside: {
|
||||
'keyword': /^set\b/i,
|
||||
'string': string,
|
||||
'parameter': parameter,
|
||||
'variable': [
|
||||
variable,
|
||||
/\w+(?=(?:[*\/%+\-&^|]|<<|>>)?=)/
|
||||
],
|
||||
'number': number,
|
||||
'operator': /[*\/%+\-&^|]=?|<<=?|>>=?|[!~_=]/,
|
||||
'punctuation': /[()',]/
|
||||
}
|
||||
},
|
||||
{
|
||||
// Other commands
|
||||
pattern: /((?:^|[&(])[ \t]*@?)\w+\b(?:[^^&)\r\n]|\^(?:\r\n|[\s\S]))*/im,
|
||||
lookbehind: true,
|
||||
inside: {
|
||||
'keyword': /^\w+\b/i,
|
||||
'string': string,
|
||||
'parameter': parameter,
|
||||
'label': {
|
||||
pattern: /(^\s*):\S+/m,
|
||||
lookbehind: true,
|
||||
alias: 'property'
|
||||
},
|
||||
'variable': variable,
|
||||
'number': number,
|
||||
'operator': /\^/
|
||||
}
|
||||
}
|
||||
],
|
||||
'operator': /[&@]/,
|
||||
'punctuation': /[()']/
|
||||
};
|
||||
}(Prism));
|
1
assets/js/components/prism-batch.min.js
vendored
Normal file
1
assets/js/components/prism-batch.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
!function(e){var r=/%%?[~:\w]+%?|!\S+!/,t={pattern:/\/[a-z?]+(?=[ :]|$):?|-[a-z]\b|--[a-z-]+\b/im,alias:"attr-name",inside:{punctuation:/:/}},n=/"[^"]*"/,i=/(?:\b|-)\d+\b/;e.languages.batch={comment:[/^::.*/m,{pattern:/((?:^|[&(])[ \t]*)rem\b(?:[^^&)\r\n]|\^(?:\r\n|[\s\S]))*/im,lookbehind:!0}],label:{pattern:/^:.*/m,alias:"property"},command:[{pattern:/((?:^|[&(])[ \t]*)for(?: ?\/[a-z?](?:[ :](?:"[^"]*"|\S+))?)* \S+ in \([^)]+\) do/im,lookbehind:!0,inside:{keyword:/^for\b|\b(?:in|do)\b/i,string:n,parameter:t,variable:r,number:i,punctuation:/[()',]/}},{pattern:/((?:^|[&(])[ \t]*)if(?: ?\/[a-z?](?:[ :](?:"[^"]*"|\S+))?)* (?:not )?(?:cmdextversion \d+|defined \w+|errorlevel \d+|exist \S+|(?:"[^"]*"|\S+)?(?:==| (?:equ|neq|lss|leq|gtr|geq) )(?:"[^"]*"|\S+))/im,lookbehind:!0,inside:{keyword:/^if\b|\b(?:not|cmdextversion|defined|errorlevel|exist)\b/i,string:n,parameter:t,variable:r,number:i,operator:/\^|==|\b(?:equ|neq|lss|leq|gtr|geq)\b/i}},{pattern:/((?:^|[&()])[ \t]*)else\b/im,lookbehind:!0,inside:{keyword:/^else\b/i}},{pattern:/((?:^|[&(])[ \t]*)set(?: ?\/[a-z](?:[ :](?:"[^"]*"|\S+))?)* (?:[^^&)\r\n]|\^(?:\r\n|[\s\S]))*/im,lookbehind:!0,inside:{keyword:/^set\b/i,string:n,parameter:t,variable:[r,/\w+(?=(?:[*\/%+\-&^|]|<<|>>)?=)/],number:i,operator:/[*\/%+\-&^|]=?|<<=?|>>=?|[!~_=]/,punctuation:/[()',]/}},{pattern:/((?:^|[&(])[ \t]*@?)\w+\b(?:[^^&)\r\n]|\^(?:\r\n|[\s\S]))*/im,lookbehind:!0,inside:{keyword:/^\w+\b/i,string:n,parameter:t,label:{pattern:/(^\s*):\S+/m,lookbehind:!0,alias:"property"},variable:r,number:i,operator:/\^/}}],operator:/[&@]/,punctuation:/[()']/}}(Prism);
|
39
assets/js/components/prism-bison.js
Normal file
39
assets/js/components/prism-bison.js
Normal file
|
@ -0,0 +1,39 @@
|
|||
Prism.languages.bison = Prism.languages.extend('c', {});
|
||||
|
||||
Prism.languages.insertBefore('bison', 'comment', {
|
||||
'bison': {
|
||||
// This should match all the beginning of the file
|
||||
// including the prologue(s), the bison declarations and
|
||||
// the grammar rules.
|
||||
pattern: /^[\s\S]*?%%[\s\S]*?%%/,
|
||||
inside: {
|
||||
'c': {
|
||||
// Allow for one level of nested braces
|
||||
pattern: /%\{[\s\S]*?%\}|\{(?:\{[^}]*\}|[^{}])*\}/,
|
||||
inside: {
|
||||
'delimiter': {
|
||||
pattern: /^%?\{|%?\}$/,
|
||||
alias: 'punctuation'
|
||||
},
|
||||
'bison-variable': {
|
||||
pattern: /[$@](?:<[^\s>]+>)?[\w$]+/,
|
||||
alias: 'variable',
|
||||
inside: {
|
||||
'punctuation': /<|>/
|
||||
}
|
||||
},
|
||||
rest: Prism.languages.c
|
||||
}
|
||||
},
|
||||
'comment': Prism.languages.c.comment,
|
||||
'string': Prism.languages.c.string,
|
||||
'property': /\S+(?=:)/,
|
||||
'keyword': /%\w+/,
|
||||
'number': {
|
||||
pattern: /(^|[^@])\b(?:0x[\da-f]+|\d+)/i,
|
||||
lookbehind: true
|
||||
},
|
||||
'punctuation': /%[%?]|[|:;\[\]<>]/
|
||||
}
|
||||
}
|
||||
});
|
1
assets/js/components/prism-bison.min.js
vendored
Normal file
1
assets/js/components/prism-bison.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
Prism.languages.bison=Prism.languages.extend("c",{}),Prism.languages.insertBefore("bison","comment",{bison:{pattern:/^[\s\S]*?%%[\s\S]*?%%/,inside:{c:{pattern:/%\{[\s\S]*?%\}|\{(?:\{[^}]*\}|[^{}])*\}/,inside:{delimiter:{pattern:/^%?\{|%?\}$/,alias:"punctuation"},"bison-variable":{pattern:/[$@](?:<[^\s>]+>)?[\w$]+/,alias:"variable",inside:{punctuation:/<|>/}},rest:Prism.languages.c}},comment:Prism.languages.c.comment,string:Prism.languages.c.string,property:/\S+(?=:)/,keyword:/%\w+/,number:{pattern:/(^|[^@])\b(?:0x[\da-f]+|\d+)/i,lookbehind:!0},punctuation:/%[%?]|[|:;\[\]<>]/}}});
|
20
assets/js/components/prism-brainfuck.js
Normal file
20
assets/js/components/prism-brainfuck.js
Normal file
|
@ -0,0 +1,20 @@
|
|||
Prism.languages.brainfuck = {
|
||||
'pointer': {
|
||||
pattern: /<|>/,
|
||||
alias: 'keyword'
|
||||
},
|
||||
'increment': {
|
||||
pattern: /\+/,
|
||||
alias: 'inserted'
|
||||
},
|
||||
'decrement': {
|
||||
pattern: /-/,
|
||||
alias: 'deleted'
|
||||
},
|
||||
'branching': {
|
||||
pattern: /\[|\]/,
|
||||
alias: 'important'
|
||||
},
|
||||
'operator': /[.,]/,
|
||||
'comment': /\S+/
|
||||
};
|
1
assets/js/components/prism-brainfuck.min.js
vendored
Normal file
1
assets/js/components/prism-brainfuck.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
Prism.languages.brainfuck={pointer:{pattern:/<|>/,alias:"keyword"},increment:{pattern:/\+/,alias:"inserted"},decrement:{pattern:/-/,alias:"deleted"},branching:{pattern:/\[|\]/,alias:"important"},operator:/[.,]/,comment:/\S+/};
|
50
assets/js/components/prism-bro.js
Normal file
50
assets/js/components/prism-bro.js
Normal file
|
@ -0,0 +1,50 @@
|
|||
Prism.languages.bro = {
|
||||
|
||||
'comment': {
|
||||
pattern: /(^|[^\\$])#.*/,
|
||||
lookbehind: true,
|
||||
inside: {
|
||||
'italic': /\b(TODO|FIXME|XXX)\b/
|
||||
}
|
||||
},
|
||||
|
||||
'string': {
|
||||
pattern: /(["'])(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
|
||||
greedy: true
|
||||
},
|
||||
|
||||
'boolean': /\b(T|F)\b/,
|
||||
|
||||
'function': {
|
||||
pattern: /(?:function|hook|event) [a-zA-Z0-9_]+(::[a-zA-Z0-9_]+)?/,
|
||||
inside: {
|
||||
keyword: /^(?:function|hook|event)/
|
||||
}
|
||||
},
|
||||
|
||||
'variable': {
|
||||
pattern: /(?:global|local) [a-zA-Z0-9_]+/i,
|
||||
inside: {
|
||||
keyword: /(?:global|local)/
|
||||
}
|
||||
},
|
||||
|
||||
'builtin':
|
||||
/(@(load(-(sigs|plugin))?|unload|prefixes|ifn?def|else|(end)?if|DIR|FILENAME))|(&?(redef|priority|log|optional|default|add_func|delete_func|expire_func|read_expire|write_expire|create_expire|synchronized|persistent|rotate_interval|rotate_size|encrypt|raw_output|mergeable|group|error_handler|type_column))/,
|
||||
|
||||
'constant': {
|
||||
pattern: /const [a-zA-Z0-9_]+/i,
|
||||
inside: {
|
||||
keyword: /const/
|
||||
}
|
||||
},
|
||||
|
||||
'keyword':
|
||||
/\b(break|next|continue|alarm|using|of|add|delete|export|print|return|schedule|when|timeout|addr|any|bool|count|double|enum|file|int|interval|pattern|opaque|port|record|set|string|subnet|table|time|vector|for|if|else|in|module|function)\b/,
|
||||
|
||||
'operator': /--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&|\|\|?|\?|\*|\/|~|\^|%/,
|
||||
|
||||
'number': /\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)\b/i,
|
||||
|
||||
'punctuation': /[{}[\];(),.:]/
|
||||
};
|
1
assets/js/components/prism-bro.min.js
vendored
Normal file
1
assets/js/components/prism-bro.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
Prism.languages.bro={comment:{pattern:/(^|[^\\$])#.*/,lookbehind:!0,inside:{italic:/\b(TODO|FIXME|XXX)\b/}},string:{pattern:/(["'])(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"boolean":/\b(T|F)\b/,"function":{pattern:/(?:function|hook|event) [a-zA-Z0-9_]+(::[a-zA-Z0-9_]+)?/,inside:{keyword:/^(?:function|hook|event)/}},variable:{pattern:/(?:global|local) [a-zA-Z0-9_]+/i,inside:{keyword:/(?:global|local)/}},builtin:/(@(load(-(sigs|plugin))?|unload|prefixes|ifn?def|else|(end)?if|DIR|FILENAME))|(&?(redef|priority|log|optional|default|add_func|delete_func|expire_func|read_expire|write_expire|create_expire|synchronized|persistent|rotate_interval|rotate_size|encrypt|raw_output|mergeable|group|error_handler|type_column))/,constant:{pattern:/const [a-zA-Z0-9_]+/i,inside:{keyword:/const/}},keyword:/\b(break|next|continue|alarm|using|of|add|delete|export|print|return|schedule|when|timeout|addr|any|bool|count|double|enum|file|int|interval|pattern|opaque|port|record|set|string|subnet|table|time|vector|for|if|else|in|module|function)\b/,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&|\|\|?|\?|\*|\/|~|\^|%/,number:/\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)\b/i,punctuation:/[{}[\];(),.:]/};
|
33
assets/js/components/prism-c.js
Normal file
33
assets/js/components/prism-c.js
Normal file
|
@ -0,0 +1,33 @@
|
|||
Prism.languages.c = Prism.languages.extend('clike', {
|
||||
'keyword': /\b(asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/,
|
||||
'operator': /\-[>-]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|?\||[~^%?*\/]/,
|
||||
'number': /\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)[ful]*\b/i
|
||||
});
|
||||
|
||||
Prism.languages.insertBefore('c', 'string', {
|
||||
'macro': {
|
||||
// allow for multiline macro definitions
|
||||
// spaces after the # character compile fine with gcc
|
||||
pattern: /(^\s*)#\s*[a-z]+([^\r\n\\]|\\.|\\(?:\r\n?|\n))*/im,
|
||||
lookbehind: true,
|
||||
alias: 'property',
|
||||
inside: {
|
||||
// highlight the path of the include statement as a string
|
||||
'string': {
|
||||
pattern: /(#\s*include\s*)(<.+?>|("|')(\\?.)+?\3)/,
|
||||
lookbehind: true
|
||||
},
|
||||
// highlight macro directives as keywords
|
||||
'directive': {
|
||||
pattern: /(#\s*)\b(define|elif|else|endif|error|ifdef|ifndef|if|import|include|line|pragma|undef|using)\b/,
|
||||
lookbehind: true,
|
||||
alias: 'keyword'
|
||||
}
|
||||
}
|
||||
},
|
||||
// highlight predefined macros as constants
|
||||
'constant': /\b(__FILE__|__LINE__|__DATE__|__TIME__|__TIMESTAMP__|__func__|EOF|NULL|stdin|stdout|stderr)\b/
|
||||
});
|
||||
|
||||
delete Prism.languages.c['class-name'];
|
||||
delete Prism.languages.c['boolean'];
|
1
assets/js/components/prism-c.min.js
vendored
Normal file
1
assets/js/components/prism-c.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
Prism.languages.c=Prism.languages.extend("clike",{keyword:/\b(asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/,operator:/\-[>-]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|?\||[~^%?*\/]/,number:/\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)[ful]*\b/i}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^\s*)#\s*[a-z]+([^\r\n\\]|\\.|\\(?:\r\n?|\n))*/im,lookbehind:!0,alias:"property",inside:{string:{pattern:/(#\s*include\s*)(<.+?>|("|')(\\?.)+?\3)/,lookbehind:!0},directive:{pattern:/(#\s*)\b(define|elif|else|endif|error|ifdef|ifndef|if|import|include|line|pragma|undef|using)\b/,lookbehind:!0,alias:"keyword"}}},constant:/\b(__FILE__|__LINE__|__DATE__|__TIME__|__TIMESTAMP__|__func__|EOF|NULL|stdin|stdout|stderr)\b/}),delete Prism.languages.c["class-name"],delete Prism.languages.c["boolean"];
|
29
assets/js/components/prism-clike.js
Normal file
29
assets/js/components/prism-clike.js
Normal file
|
@ -0,0 +1,29 @@
|
|||
Prism.languages.clike = {
|
||||
'comment': [
|
||||
{
|
||||
pattern: /(^|[^\\])\/\*[\s\S]*?\*\//,
|
||||
lookbehind: true
|
||||
},
|
||||
{
|
||||
pattern: /(^|[^\\:])\/\/.*/,
|
||||
lookbehind: true
|
||||
}
|
||||
],
|
||||
'string': {
|
||||
pattern: /(["'])(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
|
||||
greedy: true
|
||||
},
|
||||
'class-name': {
|
||||
pattern: /((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[a-z0-9_\.\\]+/i,
|
||||
lookbehind: true,
|
||||
inside: {
|
||||
punctuation: /(\.|\\)/
|
||||
}
|
||||
},
|
||||
'keyword': /\b(if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,
|
||||
'boolean': /\b(true|false)\b/,
|
||||
'function': /[a-z0-9_]+(?=\()/i,
|
||||
'number': /\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)\b/i,
|
||||
'operator': /--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,
|
||||
'punctuation': /[{}[\];(),.:]/
|
||||
};
|
1
assets/js/components/prism-clike.min.js
vendored
Normal file
1
assets/js/components/prism-clike.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?\*\//,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0}],string:{pattern:/(["'])(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[a-z0-9_\.\\]+/i,lookbehind:!0,inside:{punctuation:/(\.|\\)/}},keyword:/\b(if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,"boolean":/\b(true|false)\b/,"function":/[a-z0-9_]+(?=\()/i,number:/\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)\b/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/};
|
91
assets/js/components/prism-coffeescript.js
Normal file
91
assets/js/components/prism-coffeescript.js
Normal file
|
@ -0,0 +1,91 @@
|
|||
(function(Prism) {
|
||||
|
||||
// Ignore comments starting with { to privilege string interpolation highlighting
|
||||
var comment = /#(?!\{).+/,
|
||||
interpolation = {
|
||||
pattern: /#\{[^}]+\}/,
|
||||
alias: 'variable'
|
||||
};
|
||||
|
||||
Prism.languages.coffeescript = Prism.languages.extend('javascript', {
|
||||
'comment': comment,
|
||||
'string': [
|
||||
|
||||
// Strings are multiline
|
||||
{
|
||||
pattern: /'(?:\\?[^\\])*?'/,
|
||||
greedy: true
|
||||
},
|
||||
|
||||
{
|
||||
// Strings are multiline
|
||||
pattern: /"(?:\\?[^\\])*?"/,
|
||||
greedy: true,
|
||||
inside: {
|
||||
'interpolation': interpolation
|
||||
}
|
||||
}
|
||||
],
|
||||
'keyword': /\b(and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,
|
||||
'class-member': {
|
||||
pattern: /@(?!\d)\w+/,
|
||||
alias: 'variable'
|
||||
}
|
||||
});
|
||||
|
||||
Prism.languages.insertBefore('coffeescript', 'comment', {
|
||||
'multiline-comment': {
|
||||
pattern: /###[\s\S]+?###/,
|
||||
alias: 'comment'
|
||||
},
|
||||
|
||||
// Block regexp can contain comments and interpolation
|
||||
'block-regex': {
|
||||
pattern: /\/{3}[\s\S]*?\/{3}/,
|
||||
alias: 'regex',
|
||||
inside: {
|
||||
'comment': comment,
|
||||
'interpolation': interpolation
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Prism.languages.insertBefore('coffeescript', 'string', {
|
||||
'inline-javascript': {
|
||||
pattern: /`(?:\\?[\s\S])*?`/,
|
||||
inside: {
|
||||
'delimiter': {
|
||||
pattern: /^`|`$/,
|
||||
alias: 'punctuation'
|
||||
},
|
||||
rest: Prism.languages.javascript
|
||||
}
|
||||
},
|
||||
|
||||
// Block strings
|
||||
'multiline-string': [
|
||||
{
|
||||
pattern: /'''[\s\S]*?'''/,
|
||||
greedy: true,
|
||||
alias: 'string'
|
||||
},
|
||||
{
|
||||
pattern: /"""[\s\S]*?"""/,
|
||||
greedy: true,
|
||||
alias: 'string',
|
||||
inside: {
|
||||
interpolation: interpolation
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
});
|
||||
|
||||
Prism.languages.insertBefore('coffeescript', 'keyword', {
|
||||
// Object property
|
||||
'property': /(?!\d)\w+(?=\s*:(?!:))/
|
||||
});
|
||||
|
||||
delete Prism.languages.coffeescript['template-string'];
|
||||
|
||||
}(Prism));
|
1
assets/js/components/prism-coffeescript.min.js
vendored
Normal file
1
assets/js/components/prism-coffeescript.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
!function(e){var t=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:t,string:[{pattern:/'(?:\\?[^\\])*?'/,greedy:!0},{pattern:/"(?:\\?[^\\])*?"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:t,interpolation:n}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\?[\s\S])*?`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},rest:e.languages.javascript}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:n}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"]}(Prism);
|
12
assets/js/components/prism-cpp.js
Normal file
12
assets/js/components/prism-cpp.js
Normal file
|
@ -0,0 +1,12 @@
|
|||
Prism.languages.cpp = Prism.languages.extend('c', {
|
||||
'keyword': /\b(alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|class|compl|const|constexpr|const_cast|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|float|for|friend|goto|if|inline|int|long|mutable|namespace|new|noexcept|nullptr|operator|private|protected|public|register|reinterpret_cast|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,
|
||||
'boolean': /\b(true|false)\b/,
|
||||
'operator': /[-+]{1,2}|!=?|<{1,2}=?|>{1,2}=?|\->|:{1,2}|={1,2}|\^|~|%|&{1,2}|\|?\||\?|\*|\/|\b(and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/
|
||||
});
|
||||
|
||||
Prism.languages.insertBefore('cpp', 'keyword', {
|
||||
'class-name': {
|
||||
pattern: /(class\s+)[a-z0-9_]+/i,
|
||||
lookbehind: true
|
||||
}
|
||||
});
|
1
assets/js/components/prism-cpp.min.js
vendored
Normal file
1
assets/js/components/prism-cpp.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
Prism.languages.cpp=Prism.languages.extend("c",{keyword:/\b(alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|class|compl|const|constexpr|const_cast|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|float|for|friend|goto|if|inline|int|long|mutable|namespace|new|noexcept|nullptr|operator|private|protected|public|register|reinterpret_cast|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,"boolean":/\b(true|false)\b/,operator:/[-+]{1,2}|!=?|<{1,2}=?|>{1,2}=?|\->|:{1,2}|={1,2}|\^|~|%|&{1,2}|\|?\||\?|\*|\/|\b(and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/}),Prism.languages.insertBefore("cpp","keyword",{"class-name":{pattern:/(class\s+)[a-z0-9_]+/i,lookbehind:!0}});
|
53
assets/js/components/prism-crystal.js
Normal file
53
assets/js/components/prism-crystal.js
Normal file
|
@ -0,0 +1,53 @@
|
|||
(function(Prism) {
|
||||
Prism.languages.crystal = Prism.languages.extend('ruby', {
|
||||
keyword: [
|
||||
/\b(?:abstract|alias|as|asm|begin|break|case|class|def|do|else|elsif|end|ensure|enum|extend|for|fun|if|include|instance_sizeof|lib|macro|module|next|of|out|pointerof|private|protected|rescue|return|require|select|self|sizeof|struct|super|then|type|typeof|uninitialized|union|unless|until|when|while|with|yield|__DIR__|__END_LINE__|__FILE__|__LINE__)\b/,
|
||||
{
|
||||
pattern: /(\.\s*)(?:is_a|responds_to)\?/,
|
||||
lookbehind: true
|
||||
}
|
||||
],
|
||||
|
||||
number: /\b(?:0b[01_]*[01]|0o[0-7_]*[0-7]|0x[0-9a-fA-F_]*[0-9a-fA-F]|(?:\d(?:[0-9_]*\d)?)(?:\.[0-9_]*\d)?(?:[eE][+-]?[0-9_]*\d)?)(?:_(?:[uif](?:8|16|32|64))?)?\b/,
|
||||
});
|
||||
|
||||
var rest = Prism.util.clone(Prism.languages.crystal);
|
||||
|
||||
Prism.languages.insertBefore('crystal', 'string', {
|
||||
attribute: {
|
||||
pattern: /@\[.+?\]/,
|
||||
alias: 'attr-name',
|
||||
inside: {
|
||||
delimiter: {
|
||||
pattern: /^@\[|\]$/,
|
||||
alias: 'tag'
|
||||
},
|
||||
rest: rest
|
||||
}
|
||||
},
|
||||
|
||||
expansion: [
|
||||
{
|
||||
pattern: /\{\{.+?\}\}/,
|
||||
inside: {
|
||||
delimiter: {
|
||||
pattern: /^\{\{|\}\}$/,
|
||||
alias: 'tag'
|
||||
},
|
||||
rest: rest
|
||||
}
|
||||
},
|
||||
{
|
||||
pattern: /\{%.+?%\}/,
|
||||
inside: {
|
||||
delimiter: {
|
||||
pattern: /^\{%|%\}$/,
|
||||
alias: 'tag'
|
||||
},
|
||||
rest: rest
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
}(Prism));
|
1
assets/js/components/prism-crystal.min.js
vendored
Normal file
1
assets/js/components/prism-crystal.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
!function(e){e.languages.crystal=e.languages.extend("ruby",{keyword:[/\b(?:abstract|alias|as|asm|begin|break|case|class|def|do|else|elsif|end|ensure|enum|extend|for|fun|if|include|instance_sizeof|lib|macro|module|next|of|out|pointerof|private|protected|rescue|return|require|select|self|sizeof|struct|super|then|type|typeof|uninitialized|union|unless|until|when|while|with|yield|__DIR__|__END_LINE__|__FILE__|__LINE__)\b/,{pattern:/(\.\s*)(?:is_a|responds_to)\?/,lookbehind:!0}],number:/\b(?:0b[01_]*[01]|0o[0-7_]*[0-7]|0x[0-9a-fA-F_]*[0-9a-fA-F]|(?:\d(?:[0-9_]*\d)?)(?:\.[0-9_]*\d)?(?:[eE][+-]?[0-9_]*\d)?)(?:_(?:[uif](?:8|16|32|64))?)?\b/});var t=e.util.clone(e.languages.crystal);e.languages.insertBefore("crystal","string",{attribute:{pattern:/@\[.+?\]/,alias:"attr-name",inside:{delimiter:{pattern:/^@\[|\]$/,alias:"tag"},rest:t}},expansion:[{pattern:/\{\{.+?\}\}/,inside:{delimiter:{pattern:/^\{\{|\}\}$/,alias:"tag"},rest:t}},{pattern:/\{%.+?%\}/,inside:{delimiter:{pattern:/^\{%|%\}$/,alias:"tag"},rest:t}}]})}(Prism);
|
38
assets/js/components/prism-csharp.js
Normal file
38
assets/js/components/prism-csharp.js
Normal file
|
@ -0,0 +1,38 @@
|
|||
Prism.languages.csharp = Prism.languages.extend('clike', {
|
||||
'keyword': /\b(abstract|as|async|await|base|bool|break|byte|case|catch|char|checked|class|const|continue|decimal|default|delegate|do|double|else|enum|event|explicit|extern|false|finally|fixed|float|for|foreach|goto|if|implicit|in|int|interface|internal|is|lock|long|namespace|new|null|object|operator|out|override|params|private|protected|public|readonly|ref|return|sbyte|sealed|short|sizeof|stackalloc|static|string|struct|switch|this|throw|true|try|typeof|uint|ulong|unchecked|unsafe|ushort|using|virtual|void|volatile|while|add|alias|ascending|async|await|descending|dynamic|from|get|global|group|into|join|let|orderby|partial|remove|select|set|value|var|where|yield)\b/,
|
||||
'string': [
|
||||
{
|
||||
pattern: /@("|')(\1\1|\\\1|\\?(?!\1)[\s\S])*\1/,
|
||||
greedy: true
|
||||
},
|
||||
{
|
||||
pattern: /("|')(\\?.)*?\1/,
|
||||
greedy: true
|
||||
}
|
||||
],
|
||||
'number': /\b-?(0x[\da-f]+|\d*\.?\d+f?)\b/i
|
||||
});
|
||||
|
||||
Prism.languages.insertBefore('csharp', 'keyword', {
|
||||
'generic-method': {
|
||||
pattern: /[a-z0-9_]+\s*<[^>\r\n]+?>\s*(?=\()/i,
|
||||
alias: 'function',
|
||||
inside: {
|
||||
keyword: Prism.languages.csharp.keyword,
|
||||
punctuation: /[<>(),.:]/
|
||||
}
|
||||
},
|
||||
'preprocessor': {
|
||||
pattern: /(^\s*)#.*/m,
|
||||
lookbehind: true,
|
||||
alias: 'property',
|
||||
inside: {
|
||||
// highlight preprocessor directives as keywords
|
||||
'directive': {
|
||||
pattern: /(\s*#)\b(define|elif|else|endif|endregion|error|if|line|pragma|region|undef|warning)\b/,
|
||||
lookbehind: true,
|
||||
alias: 'keyword'
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
1
assets/js/components/prism-csharp.min.js
vendored
Normal file
1
assets/js/components/prism-csharp.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
Prism.languages.csharp=Prism.languages.extend("clike",{keyword:/\b(abstract|as|async|await|base|bool|break|byte|case|catch|char|checked|class|const|continue|decimal|default|delegate|do|double|else|enum|event|explicit|extern|false|finally|fixed|float|for|foreach|goto|if|implicit|in|int|interface|internal|is|lock|long|namespace|new|null|object|operator|out|override|params|private|protected|public|readonly|ref|return|sbyte|sealed|short|sizeof|stackalloc|static|string|struct|switch|this|throw|true|try|typeof|uint|ulong|unchecked|unsafe|ushort|using|virtual|void|volatile|while|add|alias|ascending|async|await|descending|dynamic|from|get|global|group|into|join|let|orderby|partial|remove|select|set|value|var|where|yield)\b/,string:[{pattern:/@("|')(\1\1|\\\1|\\?(?!\1)[\s\S])*\1/,greedy:!0},{pattern:/("|')(\\?.)*?\1/,greedy:!0}],number:/\b-?(0x[\da-f]+|\d*\.?\d+f?)\b/i}),Prism.languages.insertBefore("csharp","keyword",{"generic-method":{pattern:/[a-z0-9_]+\s*<[^>\r\n]+?>\s*(?=\()/i,alias:"function",inside:{keyword:Prism.languages.csharp.keyword,punctuation:/[<>(),.:]/}},preprocessor:{pattern:/(^\s*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(\s*#)\b(define|elif|else|endif|endregion|error|if|line|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});
|
16
assets/js/components/prism-css-extras.js
Normal file
16
assets/js/components/prism-css-extras.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
Prism.languages.css.selector = {
|
||||
pattern: /[^\{\}\s][^\{\}]*(?=\s*\{)/,
|
||||
inside: {
|
||||
'pseudo-element': /:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,
|
||||
'pseudo-class': /:[-\w]+(?:\(.*\))?/,
|
||||
'class': /\.[-:\.\w]+/,
|
||||
'id': /#[-:\.\w]+/,
|
||||
'attribute': /\[[^\]]+\]/
|
||||
}
|
||||
};
|
||||
|
||||
Prism.languages.insertBefore('css', 'function', {
|
||||
'hexcode': /#[\da-f]{3,8}/i,
|
||||
'entity': /\\[\da-f]{1,8}/i,
|
||||
'number': /[\d%\.]+/
|
||||
});
|
1
assets/js/components/prism-css-extras.min.js
vendored
Normal file
1
assets/js/components/prism-css-extras.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
Prism.languages.css.selector={pattern:/[^\{\}\s][^\{\}]*(?=\s*\{)/,inside:{"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+(?:\(.*\))?/,"class":/\.[-:\.\w]+/,id:/#[-:\.\w]+/,attribute:/\[[^\]]+\]/}},Prism.languages.insertBefore("css","function",{hexcode:/#[\da-f]{3,8}/i,entity:/\\[\da-f]{1,8}/i,number:/[\d%\.]+/});
|
51
assets/js/components/prism-css.js
Normal file
51
assets/js/components/prism-css.js
Normal file
|
@ -0,0 +1,51 @@
|
|||
Prism.languages.css = {
|
||||
'comment': /\/\*[\s\S]*?\*\//,
|
||||
'atrule': {
|
||||
pattern: /@[\w-]+?.*?(;|(?=\s*\{))/i,
|
||||
inside: {
|
||||
'rule': /@[\w-]+/
|
||||
// See rest below
|
||||
}
|
||||
},
|
||||
'url': /url\((?:(["'])(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,
|
||||
'selector': /[^\{\}\s][^\{\};]*?(?=\s*\{)/,
|
||||
'string': {
|
||||
pattern: /("|')(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
|
||||
greedy: true
|
||||
},
|
||||
'property': /(\b|\B)[\w-]+(?=\s*:)/i,
|
||||
'important': /\B!important\b/i,
|
||||
'function': /[-a-z0-9]+(?=\()/i,
|
||||
'punctuation': /[(){};:]/
|
||||
};
|
||||
|
||||
Prism.languages.css['atrule'].inside.rest = Prism.util.clone(Prism.languages.css);
|
||||
|
||||
if (Prism.languages.markup) {
|
||||
Prism.languages.insertBefore('markup', 'tag', {
|
||||
'style': {
|
||||
pattern: /(<style[\s\S]*?>)[\s\S]*?(?=<\/style>)/i,
|
||||
lookbehind: true,
|
||||
inside: Prism.languages.css,
|
||||
alias: 'language-css'
|
||||
}
|
||||
});
|
||||
|
||||
Prism.languages.insertBefore('inside', 'attr-value', {
|
||||
'style-attr': {
|
||||
pattern: /\s*style=("|').*?\1/i,
|
||||
inside: {
|
||||
'attr-name': {
|
||||
pattern: /^\s*style/i,
|
||||
inside: Prism.languages.markup.tag.inside
|
||||
},
|
||||
'punctuation': /^\s*=\s*['"]|['"]\s*$/,
|
||||
'attr-value': {
|
||||
pattern: /.+/i,
|
||||
inside: Prism.languages.css
|
||||
}
|
||||
},
|
||||
alias: 'language-css'
|
||||
}
|
||||
}, Prism.languages.markup.tag);
|
||||
}
|
1
assets/js/components/prism-css.min.js
vendored
Normal file
1
assets/js/components/prism-css.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
Prism.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-]+?.*?(;|(?=\s*\{))/i,inside:{rule:/@[\w-]+/}},url:/url\((?:(["'])(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,selector:/[^\{\}\s][^\{\};]*?(?=\s*\{)/,string:{pattern:/("|')(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},property:/(\b|\B)[\w-]+(?=\s*:)/i,important:/\B!important\b/i,"function":/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:]/},Prism.languages.css.atrule.inside.rest=Prism.util.clone(Prism.languages.css),Prism.languages.markup&&(Prism.languages.insertBefore("markup","tag",{style:{pattern:/(<style[\s\S]*?>)[\s\S]*?(?=<\/style>)/i,lookbehind:!0,inside:Prism.languages.css,alias:"language-css"}}),Prism.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|').*?\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:Prism.languages.markup.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:Prism.languages.css}},alias:"language-css"}},Prism.languages.markup.tag));
|
64
assets/js/components/prism-d.js
Normal file
64
assets/js/components/prism-d.js
Normal file
|
@ -0,0 +1,64 @@
|
|||
Prism.languages.d = Prism.languages.extend('clike', {
|
||||
'string': [
|
||||
// r"", x""
|
||||
/\b[rx]"(\\.|[^\\"])*"[cwd]?/,
|
||||
// q"[]", q"()", q"<>", q"{}"
|
||||
/\bq"(?:\[[\s\S]*?\]|\([\s\S]*?\)|<[\s\S]*?>|\{[\s\S]*?\})"/,
|
||||
// q"IDENT
|
||||
// ...
|
||||
// IDENT"
|
||||
/\bq"([_a-zA-Z][_a-zA-Z\d]*)(?:\r?\n|\r)[\s\S]*?(?:\r?\n|\r)\1"/,
|
||||
// q"//", q"||", etc.
|
||||
/\bq"(.)[\s\S]*?\1"/,
|
||||
// Characters
|
||||
/'(?:\\'|\\?[^']+)'/,
|
||||
|
||||
/(["`])(\\.|(?!\1)[^\\])*\1[cwd]?/
|
||||
],
|
||||
|
||||
'number': [
|
||||
// The lookbehind and the negative look-ahead try to prevent bad highlighting of the .. operator
|
||||
// Hexadecimal numbers must be handled separately to avoid problems with exponent "e"
|
||||
/\b0x\.?[a-f\d_]+(?:(?!\.\.)\.[a-f\d_]*)?(?:p[+-]?[a-f\d_]+)?[ulfi]*/i,
|
||||
{
|
||||
pattern: /((?:\.\.)?)(?:\b0b\.?|\b|\.)\d[\d_]*(?:(?!\.\.)\.[\d_]*)?(?:e[+-]?\d[\d_]*)?[ulfi]*/i,
|
||||
lookbehind: true
|
||||
}
|
||||
],
|
||||
|
||||
// In order: $, keywords and special tokens, globally defined symbols
|
||||
'keyword': /\$|\b(?:abstract|alias|align|asm|assert|auto|body|bool|break|byte|case|cast|catch|cdouble|cent|cfloat|char|class|const|continue|creal|dchar|debug|default|delegate|delete|deprecated|do|double|else|enum|export|extern|false|final|finally|float|for|foreach|foreach_reverse|function|goto|idouble|if|ifloat|immutable|import|inout|int|interface|invariant|ireal|lazy|long|macro|mixin|module|new|nothrow|null|out|override|package|pragma|private|protected|public|pure|real|ref|return|scope|shared|short|static|struct|super|switch|synchronized|template|this|throw|true|try|typedef|typeid|typeof|ubyte|ucent|uint|ulong|union|unittest|ushort|version|void|volatile|wchar|while|with|__(?:(?:FILE|MODULE|LINE|FUNCTION|PRETTY_FUNCTION|DATE|EOF|TIME|TIMESTAMP|VENDOR|VERSION)__|gshared|traits|vector|parameters)|string|wstring|dstring|size_t|ptrdiff_t)\b/,
|
||||
'operator': /\|[|=]?|&[&=]?|\+[+=]?|-[-=]?|\.?\.\.|=[>=]?|!(?:i[ns]\b|<>?=?|>=?|=)?|\bi[ns]\b|(?:<[<>]?|>>?>?|\^\^|[*\/%^~])=?/
|
||||
});
|
||||
|
||||
|
||||
Prism.languages.d.comment = [
|
||||
// Shebang
|
||||
/^\s*#!.+/,
|
||||
// /+ +/
|
||||
{
|
||||
// Allow one level of nesting
|
||||
pattern: /(^|[^\\])\/\+(?:\/\+[\s\S]*?\+\/|[\s\S])*?\+\//,
|
||||
lookbehind: true
|
||||
}
|
||||
].concat(Prism.languages.d.comment);
|
||||
|
||||
Prism.languages.insertBefore('d', 'comment', {
|
||||
'token-string': {
|
||||
// Allow one level of nesting
|
||||
pattern: /\bq\{(?:|\{[^}]*\}|[^}])*\}/,
|
||||
alias: 'string'
|
||||
}
|
||||
});
|
||||
|
||||
Prism.languages.insertBefore('d', 'keyword', {
|
||||
'property': /\B@\w*/
|
||||
});
|
||||
|
||||
Prism.languages.insertBefore('d', 'function', {
|
||||
'register': {
|
||||
// Iasm registers
|
||||
pattern: /\b(?:[ABCD][LHX]|E[ABCD]X|E?(?:BP|SP|DI|SI)|[ECSDGF]S|CR[0234]|DR[012367]|TR[3-7]|X?MM[0-7]|R[ABCD]X|[BS]PL|R[BS]P|[DS]IL|R[DS]I|R(?:[89]|1[0-5])[BWD]?|XMM(?:[89]|1[0-5])|YMM(?:1[0-5]|\d))\b|\bST(?:\([0-7]\)|\b)/,
|
||||
alias: 'variable'
|
||||
}
|
||||
});
|
1
assets/js/components/prism-d.min.js
vendored
Normal file
1
assets/js/components/prism-d.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
Prism.languages.d=Prism.languages.extend("clike",{string:[/\b[rx]"(\\.|[^\\"])*"[cwd]?/,/\bq"(?:\[[\s\S]*?\]|\([\s\S]*?\)|<[\s\S]*?>|\{[\s\S]*?\})"/,/\bq"([_a-zA-Z][_a-zA-Z\d]*)(?:\r?\n|\r)[\s\S]*?(?:\r?\n|\r)\1"/,/\bq"(.)[\s\S]*?\1"/,/'(?:\\'|\\?[^']+)'/,/(["`])(\\.|(?!\1)[^\\])*\1[cwd]?/],number:[/\b0x\.?[a-f\d_]+(?:(?!\.\.)\.[a-f\d_]*)?(?:p[+-]?[a-f\d_]+)?[ulfi]*/i,{pattern:/((?:\.\.)?)(?:\b0b\.?|\b|\.)\d[\d_]*(?:(?!\.\.)\.[\d_]*)?(?:e[+-]?\d[\d_]*)?[ulfi]*/i,lookbehind:!0}],keyword:/\$|\b(?:abstract|alias|align|asm|assert|auto|body|bool|break|byte|case|cast|catch|cdouble|cent|cfloat|char|class|const|continue|creal|dchar|debug|default|delegate|delete|deprecated|do|double|else|enum|export|extern|false|final|finally|float|for|foreach|foreach_reverse|function|goto|idouble|if|ifloat|immutable|import|inout|int|interface|invariant|ireal|lazy|long|macro|mixin|module|new|nothrow|null|out|override|package|pragma|private|protected|public|pure|real|ref|return|scope|shared|short|static|struct|super|switch|synchronized|template|this|throw|true|try|typedef|typeid|typeof|ubyte|ucent|uint|ulong|union|unittest|ushort|version|void|volatile|wchar|while|with|__(?:(?:FILE|MODULE|LINE|FUNCTION|PRETTY_FUNCTION|DATE|EOF|TIME|TIMESTAMP|VENDOR|VERSION)__|gshared|traits|vector|parameters)|string|wstring|dstring|size_t|ptrdiff_t)\b/,operator:/\|[|=]?|&[&=]?|\+[+=]?|-[-=]?|\.?\.\.|=[>=]?|!(?:i[ns]\b|<>?=?|>=?|=)?|\bi[ns]\b|(?:<[<>]?|>>?>?|\^\^|[*\/%^~])=?/}),Prism.languages.d.comment=[/^\s*#!.+/,{pattern:/(^|[^\\])\/\+(?:\/\+[\s\S]*?\+\/|[\s\S])*?\+\//,lookbehind:!0}].concat(Prism.languages.d.comment),Prism.languages.insertBefore("d","comment",{"token-string":{pattern:/\bq\{(?:|\{[^}]*\}|[^}])*\}/,alias:"string"}}),Prism.languages.insertBefore("d","keyword",{property:/\B@\w*/}),Prism.languages.insertBefore("d","function",{register:{pattern:/\b(?:[ABCD][LHX]|E[ABCD]X|E?(?:BP|SP|DI|SI)|[ECSDGF]S|CR[0234]|DR[012367]|TR[3-7]|X?MM[0-7]|R[ABCD]X|[BS]PL|R[BS]P|[DS]IL|R[DS]I|R(?:[89]|1[0-5])[BWD]?|XMM(?:[89]|1[0-5])|YMM(?:1[0-5]|\d))\b|\bST(?:\([0-7]\)|\b)/,alias:"variable"}});
|
24
assets/js/components/prism-dart.js
Normal file
24
assets/js/components/prism-dart.js
Normal file
|
@ -0,0 +1,24 @@
|
|||
Prism.languages.dart = Prism.languages.extend('clike', {
|
||||
'string': [
|
||||
{
|
||||
pattern: /r?("""|''')[\s\S]*?\1/,
|
||||
greedy: true
|
||||
},
|
||||
{
|
||||
pattern: /r?("|')(\\?.)*?\1/,
|
||||
greedy: true
|
||||
}
|
||||
],
|
||||
'keyword': [
|
||||
/\b(?:async|sync|yield)\*/,
|
||||
/\b(?:abstract|assert|async|await|break|case|catch|class|const|continue|default|deferred|do|dynamic|else|enum|export|external|extends|factory|final|finally|for|get|if|implements|import|in|library|new|null|operator|part|rethrow|return|set|static|super|switch|this|throw|try|typedef|var|void|while|with|yield)\b/
|
||||
],
|
||||
'operator': /\bis!|\b(?:as|is)\b|\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/
|
||||
});
|
||||
|
||||
Prism.languages.insertBefore('dart','function',{
|
||||
'metadata': {
|
||||
pattern: /@\w+/,
|
||||
alias: 'symbol'
|
||||
}
|
||||
});
|
1
assets/js/components/prism-dart.min.js
vendored
Normal file
1
assets/js/components/prism-dart.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
Prism.languages.dart=Prism.languages.extend("clike",{string:[{pattern:/r?("""|''')[\s\S]*?\1/,greedy:!0},{pattern:/r?("|')(\\?.)*?\1/,greedy:!0}],keyword:[/\b(?:async|sync|yield)\*/,/\b(?:abstract|assert|async|await|break|case|catch|class|const|continue|default|deferred|do|dynamic|else|enum|export|external|extends|factory|final|finally|for|get|if|implements|import|in|library|new|null|operator|part|rethrow|return|set|static|super|switch|this|throw|try|typedef|var|void|while|with|yield)\b/],operator:/\bis!|\b(?:as|is)\b|\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/}),Prism.languages.insertBefore("dart","function",{metadata:{pattern:/@\w+/,alias:"symbol"}});
|
20
assets/js/components/prism-diff.js
Normal file
20
assets/js/components/prism-diff.js
Normal file
|
@ -0,0 +1,20 @@
|
|||
Prism.languages.diff = {
|
||||
'coord': [
|
||||
// Match all kinds of coord lines (prefixed by "+++", "---" or "***").
|
||||
/^(?:\*{3}|-{3}|\+{3}).*$/m,
|
||||
// Match "@@ ... @@" coord lines in unified diff.
|
||||
/^@@.*@@$/m,
|
||||
// Match coord lines in normal diff (starts with a number).
|
||||
/^\d+.*$/m
|
||||
],
|
||||
|
||||
// Match inserted and deleted lines. Support both +/- and >/< styles.
|
||||
'deleted': /^[-<].*$/m,
|
||||
'inserted': /^[+>].*$/m,
|
||||
|
||||
// Match "different" lines (prefixed with "!") in context diff.
|
||||
'diff': {
|
||||
'pattern': /^!(?!!).+$/m,
|
||||
'alias': 'important'
|
||||
}
|
||||
};
|
1
assets/js/components/prism-diff.min.js
vendored
Normal file
1
assets/js/components/prism-diff.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
Prism.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d+.*$/m],deleted:/^[-<].*$/m,inserted:/^[+>].*$/m,diff:{pattern:/^!(?!!).+$/m,alias:"important"}};
|
41
assets/js/components/prism-django.js
Normal file
41
assets/js/components/prism-django.js
Normal file
|
@ -0,0 +1,41 @@
|
|||
// Django/Jinja2 syntax definition for Prism.js <http://prismjs.com> syntax highlighter.
|
||||
// Mostly it works OK but can paint code incorrectly on complex html/template tag combinations.
|
||||
|
||||
var _django_template = {
|
||||
'property': {
|
||||
pattern: /(?:{{|{%)[\s\S]*?(?:%}|}})/g,
|
||||
greedy: true,
|
||||
inside: {
|
||||
'string': {
|
||||
pattern: /("|')(?:\\\\|\\?[^\\\r\n])*?\1/,
|
||||
greedy: true
|
||||
},
|
||||
'keyword': /\b(?:\||load|verbatim|widthratio|ssi|firstof|for|url|ifchanged|csrf_token|lorem|ifnotequal|autoescape|now|templatetag|debug|cycle|ifequal|regroup|comment|filter|endfilter|if|spaceless|with|extends|block|include|else|empty|endif|endfor|as|endblock|endautoescape|endverbatim|trans|endtrans|[Tt]rue|[Ff]alse|[Nn]one|in|is|static|macro|endmacro|call|endcall|set|endset|raw|endraw)\b/,
|
||||
'operator' : /[-+=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:or|and|not)\b/,
|
||||
'function': /\b(?:_|abs|add|addslashes|attr|batch|callable|capfirst|capitalize|center|count|cut|d|date|default|default_if_none|defined|dictsort|dictsortreversed|divisibleby|e|equalto|escape|escaped|escapejs|even|filesizeformat|first|float|floatformat|force_escape|forceescape|format|get_digit|groupby|indent|int|iriencode|iterable|join|last|length|length_is|linebreaks|linebreaksbr|linenumbers|list|ljust|lower|make_list|map|mapping|number|odd|phone2numeric|pluralize|pprint|random|reject|rejectattr|removetags|replace|reverse|rjust|round|safe|safeseq|sameas|select|selectattr|sequence|slice|slugify|sort|string|stringformat|striptags|sum|time|timesince|timeuntil|title|trim|truncate|truncatechars|truncatechars_html|truncatewords|truncatewords_html|undefined|unordered_list|upper|urlencode|urlize|urlizetrunc|wordcount|wordwrap|xmlattr|yesno)\b/,
|
||||
'important': /\b-?\d+(?:\.\d+)?\b/,
|
||||
'variable': /\b\w+?\b/,
|
||||
'punctuation' : /[[\];(),.:]/
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Prism.languages.django = Prism.languages.extend('markup', {'comment': /(?:<!--|{#)[\s\S]*?(?:#}|-->)/});
|
||||
// Updated html tag pattern to allow template tags inside html tags
|
||||
Prism.languages.django.tag.pattern = /<\/?(?!\d)[^\s>\/=$<]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\\1|\\?(?!\1)[\s\S])*\1|[^>=]+))?)*\s*\/?>/i;
|
||||
Prism.languages.insertBefore('django', 'entity', _django_template);
|
||||
Prism.languages.insertBefore('inside', 'tag', _django_template, Prism.languages.django.tag);
|
||||
|
||||
if (Prism.languages.javascript) {
|
||||
// Combine js code and template tags painting inside <script> blocks
|
||||
Prism.languages.insertBefore('inside', 'string', _django_template, Prism.languages.django.script);
|
||||
Prism.languages.django.script.inside.string.inside = _django_template;
|
||||
}
|
||||
if (Prism.languages.css) {
|
||||
// Combine css code and template tags painting inside <style> blocks
|
||||
Prism.languages.insertBefore('inside', 'atrule', {'tag': _django_template.property}, Prism.languages.django.style);
|
||||
Prism.languages.django.style.inside.string.inside = _django_template;
|
||||
}
|
||||
|
||||
// Add an Jinja2 alias
|
||||
Prism.languages.jinja2 = Prism.languages.django;
|
1
assets/js/components/prism-django.min.js
vendored
Normal file
1
assets/js/components/prism-django.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
var _django_template={property:{pattern:/(?:{{|{%)[\s\S]*?(?:%}|}})/g,greedy:!0,inside:{string:{pattern:/("|')(?:\\\\|\\?[^\\\r\n])*?\1/,greedy:!0},keyword:/\b(?:\||load|verbatim|widthratio|ssi|firstof|for|url|ifchanged|csrf_token|lorem|ifnotequal|autoescape|now|templatetag|debug|cycle|ifequal|regroup|comment|filter|endfilter|if|spaceless|with|extends|block|include|else|empty|endif|endfor|as|endblock|endautoescape|endverbatim|trans|endtrans|[Tt]rue|[Ff]alse|[Nn]one|in|is|static|macro|endmacro|call|endcall|set|endset|raw|endraw)\b/,operator:/[-+=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:or|and|not)\b/,"function":/\b(?:_|abs|add|addslashes|attr|batch|callable|capfirst|capitalize|center|count|cut|d|date|default|default_if_none|defined|dictsort|dictsortreversed|divisibleby|e|equalto|escape|escaped|escapejs|even|filesizeformat|first|float|floatformat|force_escape|forceescape|format|get_digit|groupby|indent|int|iriencode|iterable|join|last|length|length_is|linebreaks|linebreaksbr|linenumbers|list|ljust|lower|make_list|map|mapping|number|odd|phone2numeric|pluralize|pprint|random|reject|rejectattr|removetags|replace|reverse|rjust|round|safe|safeseq|sameas|select|selectattr|sequence|slice|slugify|sort|string|stringformat|striptags|sum|time|timesince|timeuntil|title|trim|truncate|truncatechars|truncatechars_html|truncatewords|truncatewords_html|undefined|unordered_list|upper|urlencode|urlize|urlizetrunc|wordcount|wordwrap|xmlattr|yesno)\b/,important:/\b-?\d+(?:\.\d+)?\b/,variable:/\b\w+?\b/,punctuation:/[[\];(),.:]/}}};Prism.languages.django=Prism.languages.extend("markup",{comment:/(?:<!--|{#)[\s\S]*?(?:#}|-->)/}),Prism.languages.django.tag.pattern=/<\/?(?!\d)[^\s>\/=$<]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\\1|\\?(?!\1)[\s\S])*\1|[^>=]+))?)*\s*\/?>/i,Prism.languages.insertBefore("django","entity",_django_template),Prism.languages.insertBefore("inside","tag",_django_template,Prism.languages.django.tag),Prism.languages.javascript&&(Prism.languages.insertBefore("inside","string",_django_template,Prism.languages.django.script),Prism.languages.django.script.inside.string.inside=_django_template),Prism.languages.css&&(Prism.languages.insertBefore("inside","atrule",{tag:_django_template.property},Prism.languages.django.style),Prism.languages.django.style.inside.string.inside=_django_template),Prism.languages.jinja2=Prism.languages.django;
|
11
assets/js/components/prism-docker.js
Normal file
11
assets/js/components/prism-docker.js
Normal file
|
@ -0,0 +1,11 @@
|
|||
Prism.languages.docker = {
|
||||
'keyword': {
|
||||
pattern: /(^\s*)(?:ONBUILD|FROM|MAINTAINER|RUN|EXPOSE|ENV|ADD|COPY|VOLUME|USER|WORKDIR|CMD|LABEL|ENTRYPOINT)(?=\s)/mi,
|
||||
lookbehind: true
|
||||
},
|
||||
'string': /("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*?\1/,
|
||||
'comment': /#.*/,
|
||||
'punctuation': /---|\.\.\.|[:[\]{}\-,|>?]/
|
||||
};
|
||||
|
||||
Prism.languages.dockerfile = Prism.languages.docker;
|
1
assets/js/components/prism-docker.min.js
vendored
Normal file
1
assets/js/components/prism-docker.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
Prism.languages.docker={keyword:{pattern:/(^\s*)(?:ONBUILD|FROM|MAINTAINER|RUN|EXPOSE|ENV|ADD|COPY|VOLUME|USER|WORKDIR|CMD|LABEL|ENTRYPOINT)(?=\s)/mi,lookbehind:true},string:/("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*?\1/,comment:/#.*/,punctuation:/---|\.\.\.|[:[\]{}\-,|>?]/};Prism.languages.dockerfile=Prism.languages.docker;
|
24
assets/js/components/prism-eiffel.js
Normal file
24
assets/js/components/prism-eiffel.js
Normal file
|
@ -0,0 +1,24 @@
|
|||
Prism.languages.eiffel = {
|
||||
'string': [
|
||||
// Aligned-verbatim-strings
|
||||
/"([^[]*)\[[\s\S]+?\]\1"/,
|
||||
// Non-aligned-verbatim-strings
|
||||
/"([^{]*)\{[\s\S]+?\}\1"/,
|
||||
// Single-line string
|
||||
/"(?:%\s+%|%"|.)*?"/
|
||||
],
|
||||
// (comments including quoted strings not supported)
|
||||
'comment': /--.*/,
|
||||
// normal char | special char | char code
|
||||
'char': /'(?:%'|.)+?'/,
|
||||
'keyword': /\b(?:across|agent|alias|all|and|attached|as|assign|attribute|check|class|convert|create|Current|debug|deferred|detachable|do|else|elseif|end|ensure|expanded|export|external|feature|from|frozen|if|implies|inherit|inspect|invariant|like|local|loop|not|note|obsolete|old|once|or|Precursor|redefine|rename|require|rescue|Result|retry|select|separate|some|then|undefine|until|variant|Void|when|xor)\b/i,
|
||||
'boolean': /\b(?:True|False)\b/i,
|
||||
'number': [
|
||||
// hexa | octal | bin
|
||||
/\b0[xcb][\da-f](?:_*[\da-f])*\b/i,
|
||||
// Decimal
|
||||
/(?:\d(?:_*\d)*)?\.(?:(?:\d(?:_*\d)*)?[eE][+-]?)?\d(?:_*\d)*|\d(?:_*\d)*\.?/
|
||||
],
|
||||
'punctuation': /:=|<<|>>|\(\||\|\)|->|\.(?=\w)|[{}[\];(),:?]/,
|
||||
'operator': /\\\\|\|\.\.\||\.\.|\/[~\/=]?|[><]=?|[-+*^=~]/
|
||||
};
|
1
assets/js/components/prism-eiffel.min.js
vendored
Normal file
1
assets/js/components/prism-eiffel.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
Prism.languages.eiffel={string:[/"([^[]*)\[[\s\S]+?\]\1"/,/"([^{]*)\{[\s\S]+?\}\1"/,/"(?:%\s+%|%"|.)*?"/],comment:/--.*/,"char":/'(?:%'|.)+?'/,keyword:/\b(?:across|agent|alias|all|and|attached|as|assign|attribute|check|class|convert|create|Current|debug|deferred|detachable|do|else|elseif|end|ensure|expanded|export|external|feature|from|frozen|if|implies|inherit|inspect|invariant|like|local|loop|not|note|obsolete|old|once|or|Precursor|redefine|rename|require|rescue|Result|retry|select|separate|some|then|undefine|until|variant|Void|when|xor)\b/i,"boolean":/\b(?:True|False)\b/i,number:[/\b0[xcb][\da-f](?:_*[\da-f])*\b/i,/(?:\d(?:_*\d)*)?\.(?:(?:\d(?:_*\d)*)?[eE][+-]?)?\d(?:_*\d)*|\d(?:_*\d)*\.?/],punctuation:/:=|<<|>>|\(\||\|\)|->|\.(?=\w)|[{}[\];(),:?]/,operator:/\\\\|\|\.\.\||\.\.|\/[~\/=]?|[><]=?|[-+*^=~]/};
|
93
assets/js/components/prism-elixir.js
Normal file
93
assets/js/components/prism-elixir.js
Normal file
|
@ -0,0 +1,93 @@
|
|||
Prism.languages.elixir = {
|
||||
// Negative look-ahead is needed for string interpolation
|
||||
// Negative look-behind is needed to avoid highlighting markdown headers in
|
||||
// multi-line doc strings
|
||||
'comment': {
|
||||
pattern: /(^|[^#])#(?![{#]).*/m,
|
||||
lookbehind: true
|
||||
},
|
||||
// ~r"""foo""", ~r'''foo''', ~r/foo/, ~r|foo|, ~r"foo", ~r'foo', ~r(foo), ~r[foo], ~r{foo}, ~r<foo>
|
||||
'regex': /~[rR](?:("""|'''|[\/|"'])(?:\\.|(?!\1)[^\\])+\1|\((?:\\\)|[^)])+\)|\[(?:\\\]|[^\]])+\]|\{(?:\\\}|[^}])+\}|<(?:\\>|[^>])+>)[uismxfr]*/,
|
||||
'string': [
|
||||
{
|
||||
// ~s"""foo""", ~s'''foo''', ~s/foo/, ~s|foo|, ~s"foo", ~s'foo', ~s(foo), ~s[foo], ~s{foo}, ~s<foo>
|
||||
pattern: /~[cCsSwW](?:("""|'''|[\/|"'])(?:\\.|(?!\1)[^\\])+\1|\((?:\\\)|[^)])+\)|\[(?:\\\]|[^\]])+\]|\{(?:\\\}|#\{[^}]+\}|[^}])+\}|<(?:\\>|[^>])+>)[csa]?/,
|
||||
greedy: true,
|
||||
inside: {
|
||||
// See interpolation below
|
||||
}
|
||||
},
|
||||
{
|
||||
pattern: /("""|''')[\s\S]*?\1/,
|
||||
greedy: true,
|
||||
inside: {
|
||||
// See interpolation below
|
||||
}
|
||||
},
|
||||
{
|
||||
// Multi-line strings are allowed
|
||||
pattern: /("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/,
|
||||
greedy: true,
|
||||
inside: {
|
||||
// See interpolation below
|
||||
}
|
||||
}
|
||||
],
|
||||
'atom': {
|
||||
// Look-behind prevents bad highlighting of the :: operator
|
||||
pattern: /(^|[^:]):\w+/,
|
||||
lookbehind: true,
|
||||
alias: 'symbol'
|
||||
},
|
||||
// Look-ahead prevents bad highlighting of the :: operator
|
||||
'attr-name': /\w+:(?!:)/,
|
||||
'capture': {
|
||||
// Look-behind prevents bad highlighting of the && operator
|
||||
pattern: /(^|[^&])&(?:[^&\s\d()][^\s()]*|(?=\())/,
|
||||
lookbehind: true,
|
||||
alias: 'function'
|
||||
},
|
||||
'argument': {
|
||||
// Look-behind prevents bad highlighting of the && operator
|
||||
pattern: /(^|[^&])&\d+/,
|
||||
lookbehind: true,
|
||||
alias: 'variable'
|
||||
},
|
||||
'attribute': {
|
||||
pattern: /@[\S]+/,
|
||||
alias: 'variable'
|
||||
},
|
||||
'number': /\b(?:0[box][a-f\d_]+|\d[\d_]*)(?:\.[\d_]+)?(?:e[+-]?[\d_]+)?\b/i,
|
||||
'keyword': /\b(?:after|alias|and|case|catch|cond|def(?:callback|exception|impl|module|p|protocol|struct)?|do|else|end|fn|for|if|import|not|or|require|rescue|try|unless|use|when)\b/,
|
||||
'boolean': /\b(?:true|false|nil)\b/,
|
||||
'operator': [
|
||||
/\bin\b|&&?|\|[|>]?|\\\\|::|\.\.\.?|\+\+?|-[->]?|<[-=>]|>=|!==?|\B!|=(?:==?|[>~])?|[*\/^]/,
|
||||
{
|
||||
// We don't want to match <<
|
||||
pattern: /([^<])<(?!<)/,
|
||||
lookbehind: true
|
||||
},
|
||||
{
|
||||
// We don't want to match >>
|
||||
pattern: /([^>])>(?!>)/,
|
||||
lookbehind: true
|
||||
}
|
||||
],
|
||||
'punctuation': /<<|>>|[.,%\[\]{}()]/
|
||||
};
|
||||
|
||||
Prism.languages.elixir.string.forEach(function(o) {
|
||||
o.inside = {
|
||||
'interpolation': {
|
||||
pattern: /#\{[^}]+\}/,
|
||||
inside: {
|
||||
'delimiter': {
|
||||
pattern: /^#\{|\}$/,
|
||||
alias: 'punctuation'
|
||||
},
|
||||
rest: Prism.util.clone(Prism.languages.elixir)
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
1
assets/js/components/prism-elixir.min.js
vendored
Normal file
1
assets/js/components/prism-elixir.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
Prism.languages.elixir={comment:{pattern:/(^|[^#])#(?![{#]).*/m,lookbehind:!0},regex:/~[rR](?:("""|'''|[\/|"'])(?:\\.|(?!\1)[^\\])+\1|\((?:\\\)|[^)])+\)|\[(?:\\\]|[^\]])+\]|\{(?:\\\}|[^}])+\}|<(?:\\>|[^>])+>)[uismxfr]*/,string:[{pattern:/~[cCsSwW](?:("""|'''|[\/|"'])(?:\\.|(?!\1)[^\\])+\1|\((?:\\\)|[^)])+\)|\[(?:\\\]|[^\]])+\]|\{(?:\\\}|#\{[^}]+\}|[^}])+\}|<(?:\\>|[^>])+>)[csa]?/,greedy:!0,inside:{}},{pattern:/("""|''')[\s\S]*?\1/,greedy:!0,inside:{}},{pattern:/("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0,inside:{}}],atom:{pattern:/(^|[^:]):\w+/,lookbehind:!0,alias:"symbol"},"attr-name":/\w+:(?!:)/,capture:{pattern:/(^|[^&])&(?:[^&\s\d()][^\s()]*|(?=\())/,lookbehind:!0,alias:"function"},argument:{pattern:/(^|[^&])&\d+/,lookbehind:!0,alias:"variable"},attribute:{pattern:/@[\S]+/,alias:"variable"},number:/\b(?:0[box][a-f\d_]+|\d[\d_]*)(?:\.[\d_]+)?(?:e[+-]?[\d_]+)?\b/i,keyword:/\b(?:after|alias|and|case|catch|cond|def(?:callback|exception|impl|module|p|protocol|struct)?|do|else|end|fn|for|if|import|not|or|require|rescue|try|unless|use|when)\b/,"boolean":/\b(?:true|false|nil)\b/,operator:[/\bin\b|&&?|\|[|>]?|\\\\|::|\.\.\.?|\+\+?|-[->]?|<[-=>]|>=|!==?|\B!|=(?:==?|[>~])?|[*\/^]/,{pattern:/([^<])<(?!<)/,lookbehind:!0},{pattern:/([^>])>(?!>)/,lookbehind:!0}],punctuation:/<<|>>|[.,%\[\]{}()]/},Prism.languages.elixir.string.forEach(function(e){e.inside={interpolation:{pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"},rest:Prism.util.clone(Prism.languages.elixir)}}}});
|
44
assets/js/components/prism-erlang.js
Normal file
44
assets/js/components/prism-erlang.js
Normal file
|
@ -0,0 +1,44 @@
|
|||
Prism.languages.erlang = {
|
||||
'comment': /%.+/,
|
||||
'string': {
|
||||
pattern: /"(?:\\?.)*?"/,
|
||||
greedy: true
|
||||
},
|
||||
'quoted-function': {
|
||||
pattern: /'(?:\\.|[^'\\])+'(?=\()/,
|
||||
alias: 'function'
|
||||
},
|
||||
'quoted-atom': {
|
||||
pattern: /'(?:\\.|[^'\\])+'/,
|
||||
alias: 'atom'
|
||||
},
|
||||
'boolean': /\b(?:true|false)\b/,
|
||||
'keyword': /\b(?:fun|when|case|of|end|if|receive|after|try|catch)\b/,
|
||||
'number': [
|
||||
/\$\\?./,
|
||||
/\d+#[a-z0-9]+/i,
|
||||
/(?:\b|-)\d*\.?\d+([Ee][+-]?\d+)?\b/
|
||||
],
|
||||
'function': /\b[a-z][\w@]*(?=\()/,
|
||||
'variable': {
|
||||
// Look-behind is used to prevent wrong highlighting of atoms containing "@"
|
||||
pattern: /(^|[^@])(?:\b|\?)[A-Z_][\w@]*/,
|
||||
lookbehind: true
|
||||
},
|
||||
'operator': [
|
||||
/[=\/<>:]=|=[:\/]=|\+\+?|--?|[=*\/!]|\b(?:bnot|div|rem|band|bor|bxor|bsl|bsr|not|and|or|xor|orelse|andalso)\b/,
|
||||
{
|
||||
// We don't want to match <<
|
||||
pattern: /(^|[^<])<(?!<)/,
|
||||
lookbehind: true
|
||||
},
|
||||
{
|
||||
// We don't want to match >>
|
||||
pattern: /(^|[^>])>(?!>)/,
|
||||
lookbehind: true
|
||||
}
|
||||
],
|
||||
'atom': /\b[a-z][\w@]*/,
|
||||
'punctuation': /[()[\]{}:;,.#|]|<<|>>/
|
||||
|
||||
};
|
1
assets/js/components/prism-erlang.min.js
vendored
Normal file
1
assets/js/components/prism-erlang.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
Prism.languages.erlang={comment:/%.+/,string:{pattern:/"(?:\\?.)*?"/,greedy:!0},"quoted-function":{pattern:/'(?:\\.|[^'\\])+'(?=\()/,alias:"function"},"quoted-atom":{pattern:/'(?:\\.|[^'\\])+'/,alias:"atom"},"boolean":/\b(?:true|false)\b/,keyword:/\b(?:fun|when|case|of|end|if|receive|after|try|catch)\b/,number:[/\$\\?./,/\d+#[a-z0-9]+/i,/(?:\b|-)\d*\.?\d+([Ee][+-]?\d+)?\b/],"function":/\b[a-z][\w@]*(?=\()/,variable:{pattern:/(^|[^@])(?:\b|\?)[A-Z_][\w@]*/,lookbehind:!0},operator:[/[=\/<>:]=|=[:\/]=|\+\+?|--?|[=*\/!]|\b(?:bnot|div|rem|band|bor|bxor|bsl|bsr|not|and|or|xor|orelse|andalso)\b/,{pattern:/(^|[^<])<(?!<)/,lookbehind:!0},{pattern:/(^|[^>])>(?!>)/,lookbehind:!0}],atom:/\b[a-z][\w@]*/,punctuation:/[()[\]{}:;,.#|]|<<|>>/};
|
37
assets/js/components/prism-fortran.js
Normal file
37
assets/js/components/prism-fortran.js
Normal file
|
@ -0,0 +1,37 @@
|
|||
Prism.languages.fortran = {
|
||||
'quoted-number': {
|
||||
pattern: /[BOZ](['"])[A-F0-9]+\1/i,
|
||||
alias: 'number'
|
||||
},
|
||||
'string': {
|
||||
pattern: /(?:\w+_)?(['"])(?:\1\1|&(?:\r\n?|\n)(?:\s*!.+(?:\r\n?|\n))?|(?!\1).)*(?:\1|&)/,
|
||||
inside: {
|
||||
'comment': {
|
||||
pattern: /(&(?:\r\n?|\n)\s*)!.*/,
|
||||
lookbehind: true
|
||||
}
|
||||
}
|
||||
},
|
||||
'comment': /!.*/,
|
||||
'boolean': /\.(?:TRUE|FALSE)\.(?:_\w+)?/i,
|
||||
'number': /(?:\b|[+-])(?:\d+(?:\.\d*)?|\.\d+)(?:[ED][+-]?\d+)?(?:_\w+)?/i,
|
||||
'keyword': [
|
||||
// Types
|
||||
/\b(?:INTEGER|REAL|DOUBLE ?PRECISION|COMPLEX|CHARACTER|LOGICAL)\b/i,
|
||||
// END statements
|
||||
/\b(?:END ?)?(?:BLOCK ?DATA|DO|FILE|FORALL|FUNCTION|IF|INTERFACE|MODULE(?! PROCEDURE)|PROGRAM|SELECT|SUBROUTINE|TYPE|WHERE)\b/i,
|
||||
// Statements
|
||||
/\b(?:ALLOCATABLE|ALLOCATE|BACKSPACE|CALL|CASE|CLOSE|COMMON|CONTAINS|CONTINUE|CYCLE|DATA|DEALLOCATE|DIMENSION|DO|END|EQUIVALENCE|EXIT|EXTERNAL|FORMAT|GO ?TO|IMPLICIT(?: NONE)?|INQUIRE|INTENT|INTRINSIC|MODULE PROCEDURE|NAMELIST|NULLIFY|OPEN|OPTIONAL|PARAMETER|POINTER|PRINT|PRIVATE|PUBLIC|READ|RETURN|REWIND|SAVE|SELECT|STOP|TARGET|WHILE|WRITE)\b/i,
|
||||
// Others
|
||||
/\b(?:ASSIGNMENT|DEFAULT|ELEMENTAL|ELSE|ELSEWHERE|ELSEIF|ENTRY|IN|INCLUDE|INOUT|KIND|NULL|ONLY|OPERATOR|OUT|PURE|RECURSIVE|RESULT|SEQUENCE|STAT|THEN|USE)\b/i
|
||||
],
|
||||
'operator': [
|
||||
/\*\*|\/\/|=>|[=\/]=|[<>]=?|::|[+\-*=%]|\.(?:EQ|NE|LT|LE|GT|GE|NOT|AND|OR|EQV|NEQV)\.|\.[A-Z]+\./i,
|
||||
{
|
||||
// Use lookbehind to prevent confusion with (/ /)
|
||||
pattern: /(^|(?!\().)\/(?!\))/,
|
||||
lookbehind: true
|
||||
}
|
||||
],
|
||||
'punctuation': /\(\/|\/\)|[(),;:&]/
|
||||
};
|
1
assets/js/components/prism-fortran.min.js
vendored
Normal file
1
assets/js/components/prism-fortran.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
Prism.languages.fortran={"quoted-number":{pattern:/[BOZ](['"])[A-F0-9]+\1/i,alias:"number"},string:{pattern:/(?:\w+_)?(['"])(?:\1\1|&(?:\r\n?|\n)(?:\s*!.+(?:\r\n?|\n))?|(?!\1).)*(?:\1|&)/,inside:{comment:{pattern:/(&(?:\r\n?|\n)\s*)!.*/,lookbehind:!0}}},comment:/!.*/,"boolean":/\.(?:TRUE|FALSE)\.(?:_\w+)?/i,number:/(?:\b|[+-])(?:\d+(?:\.\d*)?|\.\d+)(?:[ED][+-]?\d+)?(?:_\w+)?/i,keyword:[/\b(?:INTEGER|REAL|DOUBLE ?PRECISION|COMPLEX|CHARACTER|LOGICAL)\b/i,/\b(?:END ?)?(?:BLOCK ?DATA|DO|FILE|FORALL|FUNCTION|IF|INTERFACE|MODULE(?! PROCEDURE)|PROGRAM|SELECT|SUBROUTINE|TYPE|WHERE)\b/i,/\b(?:ALLOCATABLE|ALLOCATE|BACKSPACE|CALL|CASE|CLOSE|COMMON|CONTAINS|CONTINUE|CYCLE|DATA|DEALLOCATE|DIMENSION|DO|END|EQUIVALENCE|EXIT|EXTERNAL|FORMAT|GO ?TO|IMPLICIT(?: NONE)?|INQUIRE|INTENT|INTRINSIC|MODULE PROCEDURE|NAMELIST|NULLIFY|OPEN|OPTIONAL|PARAMETER|POINTER|PRINT|PRIVATE|PUBLIC|READ|RETURN|REWIND|SAVE|SELECT|STOP|TARGET|WHILE|WRITE)\b/i,/\b(?:ASSIGNMENT|DEFAULT|ELEMENTAL|ELSE|ELSEWHERE|ELSEIF|ENTRY|IN|INCLUDE|INOUT|KIND|NULL|ONLY|OPERATOR|OUT|PURE|RECURSIVE|RESULT|SEQUENCE|STAT|THEN|USE)\b/i],operator:[/\*\*|\/\/|=>|[=\/]=|[<>]=?|::|[+\-*=%]|\.(?:EQ|NE|LT|LE|GT|GE|NOT|AND|OR|EQV|NEQV)\.|\.[A-Z]+\./i,{pattern:/(^|(?!\().)\/(?!\))/,lookbehind:!0}],punctuation:/\(\/|\/\)|[(),;:&]/};
|
36
assets/js/components/prism-fsharp.js
Normal file
36
assets/js/components/prism-fsharp.js
Normal file
|
@ -0,0 +1,36 @@
|
|||
Prism.languages.fsharp = Prism.languages.extend('clike', {
|
||||
'comment': [
|
||||
{
|
||||
pattern: /(^|[^\\])\(\*[\s\S]*?\*\)/,
|
||||
lookbehind: true
|
||||
},
|
||||
{
|
||||
pattern: /(^|[^\\:])\/\/.*/,
|
||||
lookbehind: true
|
||||
}
|
||||
],
|
||||
'keyword': /\b(?:let|return|use|yield)(?:!\B|\b)|\b(abstract|and|as|assert|base|begin|class|default|delegate|do|done|downcast|downto|elif|else|end|exception|extern|false|finally|for|fun|function|global|if|in|inherit|inline|interface|internal|lazy|match|member|module|mutable|namespace|new|not|null|of|open|or|override|private|public|rec|select|static|struct|then|to|true|try|type|upcast|val|void|when|while|with|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue|eager|event|external|fixed|functor|include|method|mixin|object|parallel|process|protected|pure|sealed|tailcall|trait|virtual|volatile)\b/,
|
||||
'string': {
|
||||
pattern: /(?:"""[\s\S]*?"""|@"(?:""|[^"])*"|("|')(?:\\\1|\\?(?!\1)[\s\S])*\1)B?/,
|
||||
greedy: true
|
||||
},
|
||||
'number': [
|
||||
/\b-?0x[\da-fA-F]+(un|lf|LF)?\b/,
|
||||
/\b-?0b[01]+(y|uy)?\b/,
|
||||
/\b-?(\d*\.?\d+|\d+\.)([fFmM]|[eE][+-]?\d+)?\b/,
|
||||
/\b-?\d+(y|uy|s|us|l|u|ul|L|UL|I)?\b/
|
||||
]
|
||||
});
|
||||
Prism.languages.insertBefore('fsharp', 'keyword', {
|
||||
'preprocessor': {
|
||||
pattern: /^[^\r\n\S]*#.*/m,
|
||||
alias: 'property',
|
||||
inside: {
|
||||
'directive': {
|
||||
pattern: /(\s*#)\b(else|endif|if|light|line|nowarn)\b/,
|
||||
lookbehind: true,
|
||||
alias: 'keyword'
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
1
assets/js/components/prism-fsharp.min.js
vendored
Normal file
1
assets/js/components/prism-fsharp.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
Prism.languages.fsharp=Prism.languages.extend("clike",{comment:[{pattern:/(^|[^\\])\(\*[\s\S]*?\*\)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0}],keyword:/\b(?:let|return|use|yield)(?:!\B|\b)|\b(abstract|and|as|assert|base|begin|class|default|delegate|do|done|downcast|downto|elif|else|end|exception|extern|false|finally|for|fun|function|global|if|in|inherit|inline|interface|internal|lazy|match|member|module|mutable|namespace|new|not|null|of|open|or|override|private|public|rec|select|static|struct|then|to|true|try|type|upcast|val|void|when|while|with|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue|eager|event|external|fixed|functor|include|method|mixin|object|parallel|process|protected|pure|sealed|tailcall|trait|virtual|volatile)\b/,string:{pattern:/(?:"""[\s\S]*?"""|@"(?:""|[^"])*"|("|')(?:\\\1|\\?(?!\1)[\s\S])*\1)B?/,greedy:!0},number:[/\b-?0x[\da-fA-F]+(un|lf|LF)?\b/,/\b-?0b[01]+(y|uy)?\b/,/\b-?(\d*\.?\d+|\d+\.)([fFmM]|[eE][+-]?\d+)?\b/,/\b-?\d+(y|uy|s|us|l|u|ul|L|UL|I)?\b/]}),Prism.languages.insertBefore("fsharp","keyword",{preprocessor:{pattern:/^[^\r\n\S]*#.*/m,alias:"property",inside:{directive:{pattern:/(\s*#)\b(else|endif|if|light|line|nowarn)\b/,lookbehind:!0,alias:"keyword"}}}});
|
78
assets/js/components/prism-gherkin.js
Normal file
78
assets/js/components/prism-gherkin.js
Normal file
|
@ -0,0 +1,78 @@
|
|||
Prism.languages.gherkin = {
|
||||
'pystring': {
|
||||
pattern: /("""|''')[\s\S]+?\1/,
|
||||
alias: 'string'
|
||||
},
|
||||
'comment': {
|
||||
pattern: /((^|\r?\n|\r)[ \t]*)#.*/,
|
||||
lookbehind: true
|
||||
},
|
||||
'tag': {
|
||||
pattern: /((^|\r?\n|\r)[ \t]*)@\S*/,
|
||||
lookbehind: true
|
||||
},
|
||||
'feature': {
|
||||
pattern: /((^|\r?\n|\r)[ \t]*)(Ability|Ahoy matey!|Arwedd|Aspekt|Besigheid Behoefte|Business Need|Caracteristica|Característica|Egenskab|Egenskap|Eiginleiki|Feature|Fīča|Fitur|Fonctionnalité|Fonksyonalite|Funcionalidade|Funcionalitat|Functionalitate|Funcţionalitate|Funcționalitate|Functionaliteit|Fungsi|Funkcia|Funkcija|Funkcionalitāte|Funkcionalnost|Funkcja|Funksie|Funktionalität|Funktionalitéit|Funzionalità|Hwaet|Hwæt|Jellemző|Karakteristik|laH|Lastnost|Mak|Mogucnost|Mogućnost|Moznosti|Možnosti|OH HAI|Omadus|Ominaisuus|Osobina|Özellik|perbogh|poQbogh malja'|Potrzeba biznesowa|Požadavek|Požiadavka|Pretty much|Qap|Qu'meH 'ut|Savybė|Tính năng|Trajto|Vermoë|Vlastnosť|Właściwość|Značilnost|Δυνατότητα|Λειτουργία|Могућност|Мөмкинлек|Особина|Свойство|Үзенчәлеклелек|Функционал|Функционалност|Функция|Функціонал|תכונה|خاصية|خصوصیت|صلاحیت|کاروبار کی ضرورت|وِیژگی|रूप लेख|ਖਾਸੀਅਤ|ਨਕਸ਼ ਨੁਹਾਰ|ਮੁਹਾਂਦਰਾ|గుణము|ಹೆಚ್ಚಳ|ความต้องการทางธุรกิจ|ความสามารถ|โครงหลัก|기능|フィーチャ|功能|機能):([^:]+(?:\r?\n|\r|$))*/,
|
||||
lookbehind: true,
|
||||
inside: {
|
||||
'important': {
|
||||
pattern: /(:)[^\r\n]+/,
|
||||
lookbehind: true
|
||||
},
|
||||
keyword: /[^:\r\n]+:/
|
||||
}
|
||||
},
|
||||
'scenario': {
|
||||
pattern: /((^|\r?\n|\r)[ \t]*)(Abstract Scenario|Abstrakt Scenario|Achtergrond|Aer|Ær|Agtergrond|All y'all|Antecedentes|Antecedents|Atburðarás|Atburðarásir|Awww, look mate|B4|Background|Baggrund|Bakgrund|Bakgrunn|Bakgrunnur|Beispiele|Beispiller|Bối cảnh|Cefndir|Cenario|Cenário|Cenario de Fundo|Cenário de Fundo|Cenarios|Cenários|Contesto|Context|Contexte|Contexto|Conto|Contoh|Contone|Dæmi|Dasar|Dead men tell no tales|Delineacao do Cenario|Delineação do Cenário|Dis is what went down|Dữ liệu|Dyagram senaryo|Dyagram Senaryo|Egzanp|Ejemplos|Eksempler|Ekzemploj|Enghreifftiau|Esbozo do escenario|Escenari|Escenario|Esempi|Esquema de l'escenari|Esquema del escenario|Esquema do Cenario|Esquema do Cenário|Examples|EXAMPLZ|Exempel|Exemple|Exemples|Exemplos|First off|Fono|Forgatókönyv|Forgatókönyv vázlat|Fundo|Geçmiş|ghantoH|Grundlage|Hannergrond|Háttér|Heave to|Istorik|Juhtumid|Keadaan|Khung kịch bản|Khung tình huống|Kịch bản|Koncept|Konsep skenario|Kontèks|Kontekst|Kontekstas|Konteksts|Kontext|Konturo de la scenaro|Latar Belakang|lut|lut chovnatlh|lutmey|Lýsing Atburðarásar|Lýsing Dæma|Menggariskan Senario|MISHUN|MISHUN SRSLY|mo'|Náčrt Scenára|Náčrt Scénáře|Náčrt Scenáru|Oris scenarija|Örnekler|Osnova|Osnova Scenára|Osnova scénáře|Osnutek|Ozadje|Paraugs|Pavyzdžiai|Példák|Piemēri|Plan du scénario|Plan du Scénario|Plan senaryo|Plan Senaryo|Plang vum Szenario|Pozadí|Pozadie|Pozadina|Príklady|Příklady|Primer|Primeri|Primjeri|Przykłady|Raamstsenaarium|Reckon it's like|Rerefons|Scenár|Scénář|Scenarie|Scenarij|Scenarijai|Scenarijaus šablonas|Scenariji|Scenārijs|Scenārijs pēc parauga|Scenarijus|Scenario|Scénario|Scenario Amlinellol|Scenario Outline|Scenario Template|Scenariomal|Scenariomall|Scenarios|Scenariu|Scenariusz|Scenaro|Schema dello scenario|Se ðe|Se the|Se þe|Senario|Senaryo|Senaryo deskripsyon|Senaryo Deskripsyon|Senaryo taslağı|Shiver me timbers|Situācija|Situai|Situasie|Situasie Uiteensetting|Skenario|Skenario konsep|Skica|Structura scenariu|Structură scenariu|Struktura scenarija|Stsenaarium|Swa|Swa hwaer swa|Swa hwær swa|Szablon scenariusza|Szenario|Szenariogrundriss|Tapaukset|Tapaus|Tapausaihio|Taust|Tausta|Template Keadaan|Template Senario|Template Situai|The thing of it is|Tình huống|Variantai|Voorbeelde|Voorbeelden|Wharrimean is|Yo\-ho\-ho|You'll wanna|Założenia|Παραδείγματα|Περιγραφή Σεναρίου|Σενάρια|Σενάριο|Υπόβαθρο|Кереш|Контекст|Концепт|Мисаллар|Мисоллар|Основа|Передумова|Позадина|Предистория|Предыстория|Приклади|Пример|Примери|Примеры|Рамка на сценарий|Скица|Структура сценарија|Структура сценария|Структура сценарію|Сценарий|Сценарий структураси|Сценарийның төзелеше|Сценарији|Сценарио|Сценарій|Тарих|Үрнәкләр|דוגמאות|רקע|תבנית תרחיש|תרחיש|الخلفية|الگوی سناریو|امثلة|پس منظر|زمینه|سناریو|سيناريو|سيناريو مخطط|مثالیں|منظر نامے کا خاکہ|منظرنامہ|نمونه ها|उदाहरण|परिदृश्य|परिदृश्य रूपरेखा|पृष्ठभूमि|ਉਦਾਹਰਨਾਂ|ਪਟਕਥਾ|ਪਟਕਥਾ ਢਾਂਚਾ|ਪਟਕਥਾ ਰੂਪ ਰੇਖਾ|ਪਿਛੋਕੜ|ఉదాహరణలు|కథనం|నేపథ్యం|సన్నివేశం|ಉದಾಹರಣೆಗಳು|ಕಥಾಸಾರಾಂಶ|ವಿವರಣೆ|ಹಿನ್ನೆಲೆ|โครงสร้างของเหตุการณ์|ชุดของตัวอย่าง|ชุดของเหตุการณ์|แนวคิด|สรุปเหตุการณ์|เหตุการณ์|배경|시나리오|시나리오 개요|예|サンプル|シナリオ|シナリオアウトライン|シナリオテンプレ|シナリオテンプレート|テンプレ|例|例子|剧本|剧本大纲|劇本|劇本大綱|场景|场景大纲|場景|場景大綱|背景):[^:\r\n]*/,
|
||||
lookbehind: true,
|
||||
inside: {
|
||||
'important': {
|
||||
pattern: /(:)[^\r\n]*/,
|
||||
lookbehind: true
|
||||
},
|
||||
keyword: /[^:\r\n]+:/
|
||||
}
|
||||
},
|
||||
'table-body': {
|
||||
pattern: /((?:\r?\n|\r)[ \t]*\|.+\|[^\r\n]*)+/,
|
||||
lookbehind: true,
|
||||
inside: {
|
||||
'outline': {
|
||||
pattern: /<[^>]+?>/,
|
||||
alias: 'variable'
|
||||
},
|
||||
'td': {
|
||||
pattern: /\s*[^\s|][^|]*/,
|
||||
alias: 'string'
|
||||
},
|
||||
'punctuation': /\|/
|
||||
}
|
||||
},
|
||||
'table-head': {
|
||||
pattern: /((?:\r?\n|\r)[ \t]*\|.+\|[^\r\n]*)/,
|
||||
inside: {
|
||||
'th': {
|
||||
pattern: /\s*[^\s|][^|]*/,
|
||||
alias: 'variable'
|
||||
},
|
||||
'punctuation': /\|/
|
||||
}
|
||||
},
|
||||
'atrule': {
|
||||
pattern: /((?:\r?\n|\r)[ \t]+)('ach|'a|'ej|7|a|A také|A taktiež|A tiež|A zároveň|Aber|Ac|Adott|Akkor|Ak|Aleshores|Ale|Ali|Allora|Alors|Als|Ama|Amennyiben|Amikor|Ampak|an|AN|Ananging|And y'all|And|Angenommen|Anrhegedig a|An|Apabila|Atès|Atesa|Atunci|Avast!|Aye|A|awer|Bagi|Banjur|Bet|Biết|Blimey!|Buh|But at the end of the day I reckon|But y'all|But|BUT|Cal|Când|Cando|Cand|Ce|Cuando|Če|Ða ðe|Ða|Dadas|Dada|Dados|Dado|DaH ghu' bejlu'|dann|Dann|Dano|Dan|Dar|Dat fiind|Data|Date fiind|Date|Dati fiind|Dati|Daţi fiind|Dați fiind|Dato|DEN|Den youse gotta|Dengan|De|Diberi|Diyelim ki|Donada|Donat|Donitaĵo|Do|Dun|Duota|Ðurh|Eeldades|Ef|Eğer ki|Entao|Então|Entón|Entonces|En|Epi|E|És|Etant donnée|Etant donné|Et|Étant données|Étant donnée|Étant donné|Etant données|Etant donnés|Étant donnés|Fakat|Gangway!|Gdy|Gegeben seien|Gegeben sei|Gegeven|Gegewe|ghu' noblu'|Gitt|Given y'all|Given|Givet|Givun|Ha|Cho|I CAN HAZ|In|Ir|It's just unbelievable|I|Ja|Jeśli|Jeżeli|Kadar|Kada|Kad|Kai|Kaj|Když|Keď|Kemudian|Ketika|Khi|Kiedy|Ko|Kuid|Kui|Kun|Lan|latlh|Le sa a|Let go and haul|Le|Lè sa a|Lè|Logo|Lorsqu'<|Lorsque|mä|Maar|Mais|Mając|Majd|Maka|Manawa|Mas|Ma|Menawa|Men|Mutta|Nalikaning|Nalika|Nanging|Når|När|Nato|Nhưng|Niin|Njuk|O zaman|Og|Och|Oletetaan|Onda|Ond|Oraz|Pak|Pero|Però|Podano|Pokiaľ|Pokud|Potem|Potom|Privzeto|Pryd|qaSDI'|Quando|Quand|Quan|Så|Sed|Se|Siis|Sipoze ke|Sipoze Ke|Sipoze|Si|Şi|Și|Soit|Stel|Tada|Tad|Takrat|Tak|Tapi|Ter|Tetapi|Tha the|Tha|Then y'all|Then|Thì|Thurh|Toda|Too right|ugeholl|Und|Un|Và|vaj|Vendar|Ve|wann|Wanneer|WEN|Wenn|When y'all|When|Wtedy|Wun|Y'know|Yeah nah|Yna|Youse know like when|Youse know when youse got|Y|Za predpokladu|Za předpokladu|Zadani|Zadano|Zadan|Zadate|Zadato|Zakładając|Zaradi|Zatati|Þa þe|Þa|Þá|Þegar|Þurh|Αλλά|Δεδομένου|Και|Όταν|Τότε|А також|Агар|Але|Али|Аммо|А|Әгәр|Әйтик|Әмма|Бирок|Ва|Вә|Дадено|Дано|Допустим|Если|Задате|Задати|Задато|И|І|К тому же|Када|Кад|Когато|Когда|Коли|Ләкин|Лекин|Нәтиҗәдә|Нехай|Но|Онда|Припустимо, що|Припустимо|Пусть|Также|Та|Тогда|Тоді|То|Унда|Һәм|Якщо|אבל|אזי|אז|בהינתן|וגם|כאשר|آنگاه|اذاً|اگر|اما|اور|با فرض|بالفرض|بفرض|پھر|تب|ثم|جب|عندما|فرض کیا|لكن|لیکن|متى|هنگامی|و|अगर|और|कदा|किन्तु|चूंकि|जब|तथा|तदा|तब|परन्तु|पर|यदि|ਅਤੇ|ਜਦੋਂ|ਜਿਵੇਂ ਕਿ|ਜੇਕਰ|ਤਦ|ਪਰ|అప్పుడు|ఈ పరిస్థితిలో|కాని|చెప్పబడినది|మరియు|ಆದರೆ|ನಂತರ|ನೀಡಿದ|ಮತ್ತು|ಸ್ಥಿತಿಯನ್ನು|กำหนดให้|ดังนั้น|แต่|เมื่อ|และ|그러면<|그리고<|단<|만약<|만일<|먼저<|조건<|하지만<|かつ<|しかし<|ただし<|ならば<|もし<|並且<|但し<|但是<|假如<|假定<|假設<|假设<|前提<|同时<|同時<|并且<|当<|當<|而且<|那么<|那麼<)(?=[ \t]+)/,
|
||||
lookbehind: true
|
||||
},
|
||||
'string': {
|
||||
pattern: /("(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*')/,
|
||||
inside: {
|
||||
'outline': {
|
||||
pattern: /<[^>]+?>/,
|
||||
alias: 'variable'
|
||||
}
|
||||
}
|
||||
},
|
||||
'outline': {
|
||||
pattern: /<[^>]+?>/,
|
||||
alias: 'variable'
|
||||
}
|
||||
};
|
1
assets/js/components/prism-gherkin.min.js
vendored
Normal file
1
assets/js/components/prism-gherkin.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
68
assets/js/components/prism-git.js
Normal file
68
assets/js/components/prism-git.js
Normal file
|
@ -0,0 +1,68 @@
|
|||
Prism.languages.git = {
|
||||
/*
|
||||
* A simple one line comment like in a git status command
|
||||
* For instance:
|
||||
* $ git status
|
||||
* # On branch infinite-scroll
|
||||
* # Your branch and 'origin/sharedBranches/frontendTeam/infinite-scroll' have diverged,
|
||||
* # and have 1 and 2 different commits each, respectively.
|
||||
* nothing to commit (working directory clean)
|
||||
*/
|
||||
'comment': /^#.*/m,
|
||||
|
||||
/*
|
||||
* Regexp to match the changed lines in a git diff output. Check the example below.
|
||||
*/
|
||||
'deleted': /^[-–].*/m,
|
||||
'inserted': /^\+.*/m,
|
||||
|
||||
/*
|
||||
* a string (double and simple quote)
|
||||
*/
|
||||
'string': /("|')(\\?.)*?\1/m,
|
||||
|
||||
/*
|
||||
* a git command. It starts with a random prompt finishing by a $, then "git" then some other parameters
|
||||
* For instance:
|
||||
* $ git add file.txt
|
||||
*/
|
||||
'command': {
|
||||
pattern: /^.*\$ git .*$/m,
|
||||
inside: {
|
||||
/*
|
||||
* A git command can contain a parameter starting by a single or a double dash followed by a string
|
||||
* For instance:
|
||||
* $ git diff --cached
|
||||
* $ git log -p
|
||||
*/
|
||||
'parameter': /\s(--|-)\w+/m
|
||||
}
|
||||
},
|
||||
|
||||
/*
|
||||
* Coordinates displayed in a git diff command
|
||||
* For instance:
|
||||
* $ git diff
|
||||
* diff --git file.txt file.txt
|
||||
* index 6214953..1d54a52 100644
|
||||
* --- file.txt
|
||||
* +++ file.txt
|
||||
* @@ -1 +1,2 @@
|
||||
* -Here's my tetx file
|
||||
* +Here's my text file
|
||||
* +And this is the second line
|
||||
*/
|
||||
'coord': /^@@.*@@$/m,
|
||||
|
||||
/*
|
||||
* Match a "commit [SHA1]" line in a git log output.
|
||||
* For instance:
|
||||
* $ git log
|
||||
* commit a11a14ef7e26f2ca62d4b35eac455ce636d0dc09
|
||||
* Author: lgiraudel
|
||||
* Date: Mon Feb 17 11:18:34 2014 +0100
|
||||
*
|
||||
* Add of a new line
|
||||
*/
|
||||
'commit_sha1': /^commit \w{40}$/m
|
||||
};
|
1
assets/js/components/prism-git.min.js
vendored
Normal file
1
assets/js/components/prism-git.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
Prism.languages.git={comment:/^#.*/m,deleted:/^[-–].*/m,inserted:/^\+.*/m,string:/("|')(\\?.)*?\1/m,command:{pattern:/^.*\$ git .*$/m,inside:{parameter:/\s(--|-)\w+/m}},coord:/^@@.*@@$/m,commit_sha1:/^commit \w{40}$/m};
|
16
assets/js/components/prism-glsl.js
Normal file
16
assets/js/components/prism-glsl.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
Prism.languages.glsl = Prism.languages.extend('clike', {
|
||||
'comment': [
|
||||
/\/\*[\s\S]*?\*\//,
|
||||
/\/\/(?:\\(?:\r\n|[\s\S])|.)*/
|
||||
],
|
||||
'number': /\b(?:0x[\da-f]+|(?:\.\d+|\d+\.?\d*)(?:e[+-]?\d+)?)[ulf]*\b/i,
|
||||
'keyword': /\b(?:attribute|const|uniform|varying|buffer|shared|coherent|volatile|restrict|readonly|writeonly|atomic_uint|layout|centroid|flat|smooth|noperspective|patch|sample|break|continue|do|for|while|switch|case|default|if|else|subroutine|in|out|inout|float|double|int|void|bool|true|false|invariant|precise|discard|return|d?mat[234](?:x[234])?|[ibdu]?vec[234]|uint|lowp|mediump|highp|precision|[iu]?sampler[123]D|[iu]?samplerCube|sampler[12]DShadow|samplerCubeShadow|[iu]?sampler[12]DArray|sampler[12]DArrayShadow|[iu]?sampler2DRect|sampler2DRectShadow|[iu]?samplerBuffer|[iu]?sampler2DMS(?:Array)?|[iu]?samplerCubeArray|samplerCubeArrayShadow|[iu]?image[123]D|[iu]?image2DRect|[iu]?imageCube|[iu]?imageBuffer|[iu]?image[12]DArray|[iu]?imageCubeArray|[iu]?image2DMS(?:Array)?|struct|common|partition|active|asm|class|union|enum|typedef|template|this|resource|goto|inline|noinline|public|static|extern|external|interface|long|short|half|fixed|unsigned|superp|input|output|hvec[234]|fvec[234]|sampler3DRect|filter|sizeof|cast|namespace|using)\b/
|
||||
});
|
||||
|
||||
Prism.languages.insertBefore('glsl', 'comment', {
|
||||
'preprocessor': {
|
||||
pattern: /(^[ \t]*)#(?:(?:define|undef|if|ifdef|ifndef|else|elif|endif|error|pragma|extension|version|line)\b)?/m,
|
||||
lookbehind: true,
|
||||
alias: 'builtin'
|
||||
}
|
||||
});
|
1
assets/js/components/prism-glsl.min.js
vendored
Normal file
1
assets/js/components/prism-glsl.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
Prism.languages.glsl=Prism.languages.extend("clike",{comment:[/\/\*[\s\S]*?\*\//,/\/\/(?:\\(?:\r\n|[\s\S])|.)*/],number:/\b(?:0x[\da-f]+|(?:\.\d+|\d+\.?\d*)(?:e[+-]?\d+)?)[ulf]*\b/i,keyword:/\b(?:attribute|const|uniform|varying|buffer|shared|coherent|volatile|restrict|readonly|writeonly|atomic_uint|layout|centroid|flat|smooth|noperspective|patch|sample|break|continue|do|for|while|switch|case|default|if|else|subroutine|in|out|inout|float|double|int|void|bool|true|false|invariant|precise|discard|return|d?mat[234](?:x[234])?|[ibdu]?vec[234]|uint|lowp|mediump|highp|precision|[iu]?sampler[123]D|[iu]?samplerCube|sampler[12]DShadow|samplerCubeShadow|[iu]?sampler[12]DArray|sampler[12]DArrayShadow|[iu]?sampler2DRect|sampler2DRectShadow|[iu]?samplerBuffer|[iu]?sampler2DMS(?:Array)?|[iu]?samplerCubeArray|samplerCubeArrayShadow|[iu]?image[123]D|[iu]?image2DRect|[iu]?imageCube|[iu]?imageBuffer|[iu]?image[12]DArray|[iu]?imageCubeArray|[iu]?image2DMS(?:Array)?|struct|common|partition|active|asm|class|union|enum|typedef|template|this|resource|goto|inline|noinline|public|static|extern|external|interface|long|short|half|fixed|unsigned|superp|input|output|hvec[234]|fvec[234]|sampler3DRect|filter|sizeof|cast|namespace|using)\b/}),Prism.languages.insertBefore("glsl","comment",{preprocessor:{pattern:/(^[ \t]*)#(?:(?:define|undef|if|ifdef|ifndef|else|elif|endif|error|pragma|extension|version|line)\b)?/m,lookbehind:!0,alias:"builtin"}});
|
12
assets/js/components/prism-go.js
Normal file
12
assets/js/components/prism-go.js
Normal file
|
@ -0,0 +1,12 @@
|
|||
Prism.languages.go = Prism.languages.extend('clike', {
|
||||
'keyword': /\b(break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,
|
||||
'builtin': /\b(bool|byte|complex(64|128)|error|float(32|64)|rune|string|u?int(8|16|32|64|)|uintptr|append|cap|close|complex|copy|delete|imag|len|make|new|panic|print(ln)?|real|recover)\b/,
|
||||
'boolean': /\b(_|iota|nil|true|false)\b/,
|
||||
'operator': /[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,
|
||||
'number': /\b(-?(0x[a-f\d]+|(\d+\.?\d*|\.\d+)(e[-+]?\d+)?)i?)\b/i,
|
||||
'string': {
|
||||
pattern: /("|'|`)(\\?.|\r|\n)*?\1/,
|
||||
greedy: true
|
||||
}
|
||||
});
|
||||
delete Prism.languages.go['class-name'];
|
1
assets/js/components/prism-go.min.js
vendored
Normal file
1
assets/js/components/prism-go.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
Prism.languages.go=Prism.languages.extend("clike",{keyword:/\b(break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,builtin:/\b(bool|byte|complex(64|128)|error|float(32|64)|rune|string|u?int(8|16|32|64|)|uintptr|append|cap|close|complex|copy|delete|imag|len|make|new|panic|print(ln)?|real|recover)\b/,"boolean":/\b(_|iota|nil|true|false)\b/,operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,number:/\b(-?(0x[a-f\d]+|(\d+\.?\d*|\.\d+)(e[-+]?\d+)?)i?)\b/i,string:{pattern:/("|'|`)(\\?.|\r|\n)*?\1/,greedy:!0}}),delete Prism.languages.go["class-name"];
|
24
assets/js/components/prism-graphql.js
Normal file
24
assets/js/components/prism-graphql.js
Normal file
|
@ -0,0 +1,24 @@
|
|||
Prism.languages.graphql = {
|
||||
'comment': /#.*/,
|
||||
'string': {
|
||||
pattern: /"(?:\\.|[^\\"])*"/,
|
||||
greedy: true
|
||||
},
|
||||
'number': /(?:\B-|\b)\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\b/,
|
||||
'boolean': /\b(?:true|false)\b/,
|
||||
'variable': /\$[a-z_]\w*/i,
|
||||
'directive': {
|
||||
pattern: /@[a-z_]\w*/i,
|
||||
alias: 'function'
|
||||
},
|
||||
'attr-name': /[a-z_]\w*(?=\s*:)/i,
|
||||
'keyword': [
|
||||
{
|
||||
pattern: /(fragment\s+(?!on)[a-z_]\w*\s+|\.\.\.\s*)on\b/,
|
||||
lookbehind: true
|
||||
},
|
||||
/\b(?:query|fragment|mutation)\b/
|
||||
],
|
||||
'operator': /!|=|\.{3}/,
|
||||
'punctuation': /[!(){}\[\]:=,]/
|
||||
};
|
1
assets/js/components/prism-graphql.min.js
vendored
Normal file
1
assets/js/components/prism-graphql.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
Prism.languages.graphql={comment:/#.*/,string:{pattern:/"(?:\\.|[^\\"])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\b/,"boolean":/\b(?:true|false)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":/[a-z_]\w*(?=\s*:)/i,keyword:[{pattern:/(fragment\s+(?!on)[a-z_]\w*\s+|\.\.\.\s*)on\b/,lookbehind:!0},/\b(?:query|fragment|mutation)\b/],operator:/!|=|\.{3}/,punctuation:/[!(){}\[\]:=,]/};
|
65
assets/js/components/prism-groovy.js
Normal file
65
assets/js/components/prism-groovy.js
Normal file
|
@ -0,0 +1,65 @@
|
|||
Prism.languages.groovy = Prism.languages.extend('clike', {
|
||||
'keyword': /\b(as|def|in|abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|native|new|package|private|protected|public|return|short|static|strictfp|super|switch|synchronized|this|throw|throws|trait|transient|try|void|volatile|while)\b/,
|
||||
'string': [
|
||||
{
|
||||
pattern: /("""|''')[\s\S]*?\1|(\$\/)(\$\/\$|[\s\S])*?\/\$/,
|
||||
greedy: true
|
||||
},
|
||||
{
|
||||
pattern: /("|'|\/)(?:\\?.)*?\1/,
|
||||
greedy: true
|
||||
}
|
||||
],
|
||||
'number': /\b(?:0b[01_]+|0x[\da-f_]+(?:\.[\da-f_p\-]+)?|[\d_]+(?:\.[\d_]+)?(?:e[+-]?[\d]+)?)[glidf]?\b/i,
|
||||
'operator': {
|
||||
pattern: /(^|[^.])(~|==?~?|\?[.:]?|\*(?:[.=]|\*=?)?|\.[@&]|\.\.<|\.{1,2}(?!\.)|-[-=>]?|\+[+=]?|!=?|<(?:<=?|=>?)?|>(?:>>?=?|=)?|&[&=]?|\|[|=]?|\/=?|\^=?|%=?)/,
|
||||
lookbehind: true
|
||||
},
|
||||
'punctuation': /\.+|[{}[\];(),:$]/
|
||||
});
|
||||
|
||||
Prism.languages.insertBefore('groovy', 'string', {
|
||||
'shebang': {
|
||||
pattern: /#!.+/,
|
||||
alias: 'comment'
|
||||
}
|
||||
});
|
||||
|
||||
Prism.languages.insertBefore('groovy', 'punctuation', {
|
||||
'spock-block': /\b(setup|given|when|then|and|cleanup|expect|where):/
|
||||
});
|
||||
|
||||
Prism.languages.insertBefore('groovy', 'function', {
|
||||
'annotation': {
|
||||
alias: 'punctuation',
|
||||
pattern: /(^|[^.])@\w+/,
|
||||
lookbehind: true
|
||||
}
|
||||
});
|
||||
|
||||
// Handle string interpolation
|
||||
Prism.hooks.add('wrap', function(env) {
|
||||
if (env.language === 'groovy' && env.type === 'string') {
|
||||
var delimiter = env.content[0];
|
||||
|
||||
if (delimiter != "'") {
|
||||
var pattern = /([^\\])(\$(\{.*?\}|[\w\.]+))/;
|
||||
if (delimiter === '$') {
|
||||
pattern = /([^\$])(\$(\{.*?\}|[\w\.]+))/;
|
||||
}
|
||||
|
||||
// To prevent double HTML-encoding we have to decode env.content first
|
||||
env.content = env.content.replace(/</g, '<').replace(/&/g, '&');
|
||||
|
||||
env.content = Prism.highlight(env.content, {
|
||||
'expression': {
|
||||
pattern: pattern,
|
||||
lookbehind: true,
|
||||
inside: Prism.languages.groovy
|
||||
}
|
||||
});
|
||||
|
||||
env.classes.push(delimiter === '/' ? 'regex' : 'gstring');
|
||||
}
|
||||
}
|
||||
});
|
1
assets/js/components/prism-groovy.min.js
vendored
Normal file
1
assets/js/components/prism-groovy.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
Prism.languages.groovy=Prism.languages.extend("clike",{keyword:/\b(as|def|in|abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|native|new|package|private|protected|public|return|short|static|strictfp|super|switch|synchronized|this|throw|throws|trait|transient|try|void|volatile|while)\b/,string:[{pattern:/("""|''')[\s\S]*?\1|(\$\/)(\$\/\$|[\s\S])*?\/\$/,greedy:!0},{pattern:/("|'|\/)(?:\\?.)*?\1/,greedy:!0}],number:/\b(?:0b[01_]+|0x[\da-f_]+(?:\.[\da-f_p\-]+)?|[\d_]+(?:\.[\d_]+)?(?:e[+-]?[\d]+)?)[glidf]?\b/i,operator:{pattern:/(^|[^.])(~|==?~?|\?[.:]?|\*(?:[.=]|\*=?)?|\.[@&]|\.\.<|\.{1,2}(?!\.)|-[-=>]?|\+[+=]?|!=?|<(?:<=?|=>?)?|>(?:>>?=?|=)?|&[&=]?|\|[|=]?|\/=?|\^=?|%=?)/,lookbehind:!0},punctuation:/\.+|[{}[\];(),:$]/}),Prism.languages.insertBefore("groovy","string",{shebang:{pattern:/#!.+/,alias:"comment"}}),Prism.languages.insertBefore("groovy","punctuation",{"spock-block":/\b(setup|given|when|then|and|cleanup|expect|where):/}),Prism.languages.insertBefore("groovy","function",{annotation:{alias:"punctuation",pattern:/(^|[^.])@\w+/,lookbehind:!0}}),Prism.hooks.add("wrap",function(e){if("groovy"===e.language&&"string"===e.type){var t=e.content[0];if("'"!=t){var n=/([^\\])(\$(\{.*?\}|[\w\.]+))/;"$"===t&&(n=/([^\$])(\$(\{.*?\}|[\w\.]+))/),e.content=e.content.replace(/</g,"<").replace(/&/g,"&"),e.content=Prism.highlight(e.content,{expression:{pattern:n,lookbehind:!0,inside:Prism.languages.groovy}}),e.classes.push("/"===t?"regex":"gstring")}}});
|
154
assets/js/components/prism-haml.js
Normal file
154
assets/js/components/prism-haml.js
Normal file
|
@ -0,0 +1,154 @@
|
|||
/* TODO
|
||||
Handle multiline code after tag
|
||||
%foo= some |
|
||||
multiline |
|
||||
code |
|
||||
*/
|
||||
|
||||
(function(Prism) {
|
||||
|
||||
Prism.languages.haml = {
|
||||
// Multiline stuff should appear before the rest
|
||||
|
||||
'multiline-comment': {
|
||||
pattern: /((?:^|\r?\n|\r)([\t ]*))(?:\/|-#).*((?:\r?\n|\r)\2[\t ]+.+)*/,
|
||||
lookbehind: true,
|
||||
alias: 'comment'
|
||||
},
|
||||
|
||||
'multiline-code': [
|
||||
{
|
||||
pattern: /((?:^|\r?\n|\r)([\t ]*)(?:[~-]|[&!]?=)).*,[\t ]*((?:\r?\n|\r)\2[\t ]+.*,[\t ]*)*((?:\r?\n|\r)\2[\t ]+.+)/,
|
||||
lookbehind: true,
|
||||
inside: {
|
||||
rest: Prism.languages.ruby
|
||||
}
|
||||
},
|
||||
{
|
||||
pattern: /((?:^|\r?\n|\r)([\t ]*)(?:[~-]|[&!]?=)).*\|[\t ]*((?:\r?\n|\r)\2[\t ]+.*\|[\t ]*)*/,
|
||||
lookbehind: true,
|
||||
inside: {
|
||||
rest: Prism.languages.ruby
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
// See at the end of the file for known filters
|
||||
'filter': {
|
||||
pattern: /((?:^|\r?\n|\r)([\t ]*)):[\w-]+((?:\r?\n|\r)(?:\2[\t ]+.+|\s*?(?=\r?\n|\r)))+/,
|
||||
lookbehind: true,
|
||||
inside: {
|
||||
'filter-name': {
|
||||
pattern: /^:[\w-]+/,
|
||||
alias: 'variable'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
'markup': {
|
||||
pattern: /((?:^|\r?\n|\r)[\t ]*)<.+/,
|
||||
lookbehind: true,
|
||||
inside: {
|
||||
rest: Prism.languages.markup
|
||||
}
|
||||
},
|
||||
'doctype': {
|
||||
pattern: /((?:^|\r?\n|\r)[\t ]*)!!!(?: .+)?/,
|
||||
lookbehind: true
|
||||
},
|
||||
'tag': {
|
||||
// Allows for one nested group of braces
|
||||
pattern: /((?:^|\r?\n|\r)[\t ]*)[%.#][\w\-#.]*[\w\-](?:\([^)]+\)|\{(?:\{[^}]+\}|[^}])+\}|\[[^\]]+\])*[\/<>]*/,
|
||||
lookbehind: true,
|
||||
inside: {
|
||||
'attributes': [
|
||||
{
|
||||
// Lookbehind tries to prevent interpolations for breaking it all
|
||||
// Allows for one nested group of braces
|
||||
pattern: /(^|[^#])\{(?:\{[^}]+\}|[^}])+\}/,
|
||||
lookbehind: true,
|
||||
inside: {
|
||||
rest: Prism.languages.ruby
|
||||
}
|
||||
},
|
||||
{
|
||||
pattern: /\([^)]+\)/,
|
||||
inside: {
|
||||
'attr-value': {
|
||||
pattern: /(=\s*)(?:"(?:\\?.)*?"|[^)\s]+)/,
|
||||
lookbehind: true
|
||||
},
|
||||
'attr-name': /[\w:-]+(?=\s*!?=|\s*[,)])/,
|
||||
'punctuation': /[=(),]/
|
||||
}
|
||||
},
|
||||
{
|
||||
pattern: /\[[^\]]+\]/,
|
||||
inside: {
|
||||
rest: Prism.languages.ruby
|
||||
}
|
||||
}
|
||||
],
|
||||
'punctuation': /[<>]/
|
||||
}
|
||||
},
|
||||
'code': {
|
||||
pattern: /((?:^|\r?\n|\r)[\t ]*(?:[~-]|[&!]?=)).+/,
|
||||
lookbehind: true,
|
||||
inside: {
|
||||
rest: Prism.languages.ruby
|
||||
}
|
||||
},
|
||||
// Interpolations in plain text
|
||||
'interpolation': {
|
||||
pattern: /#\{[^}]+\}/,
|
||||
inside: {
|
||||
'delimiter': {
|
||||
pattern: /^#\{|\}$/,
|
||||
alias: 'punctuation'
|
||||
},
|
||||
rest: Prism.languages.ruby
|
||||
}
|
||||
},
|
||||
'punctuation': {
|
||||
pattern: /((?:^|\r?\n|\r)[\t ]*)[~=\-&!]+/,
|
||||
lookbehind: true
|
||||
}
|
||||
};
|
||||
|
||||
var filter_pattern = '((?:^|\\r?\\n|\\r)([\\t ]*)):{{filter_name}}((?:\\r?\\n|\\r)(?:\\2[\\t ]+.+|\\s*?(?=\\r?\\n|\\r)))+';
|
||||
|
||||
// Non exhaustive list of available filters and associated languages
|
||||
var filters = [
|
||||
'css',
|
||||
{filter:'coffee',language:'coffeescript'},
|
||||
'erb',
|
||||
'javascript',
|
||||
'less',
|
||||
'markdown',
|
||||
'ruby',
|
||||
'scss',
|
||||
'textile'
|
||||
];
|
||||
var all_filters = {};
|
||||
for (var i = 0, l = filters.length; i < l; i++) {
|
||||
var filter = filters[i];
|
||||
filter = typeof filter === 'string' ? {filter: filter, language: filter} : filter;
|
||||
if (Prism.languages[filter.language]) {
|
||||
all_filters['filter-' + filter.filter] = {
|
||||
pattern: RegExp(filter_pattern.replace('{{filter_name}}', filter.filter)),
|
||||
lookbehind: true,
|
||||
inside: {
|
||||
'filter-name': {
|
||||
pattern: /^:[\w-]+/,
|
||||
alias: 'variable'
|
||||
},
|
||||
rest: Prism.languages[filter.language]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Prism.languages.insertBefore('haml', 'filter', all_filters);
|
||||
|
||||
}(Prism));
|
1
assets/js/components/prism-haml.min.js
vendored
Normal file
1
assets/js/components/prism-haml.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
!function(e){e.languages.haml={"multiline-comment":{pattern:/((?:^|\r?\n|\r)([\t ]*))(?:\/|-#).*((?:\r?\n|\r)\2[\t ]+.+)*/,lookbehind:!0,alias:"comment"},"multiline-code":[{pattern:/((?:^|\r?\n|\r)([\t ]*)(?:[~-]|[&!]?=)).*,[\t ]*((?:\r?\n|\r)\2[\t ]+.*,[\t ]*)*((?:\r?\n|\r)\2[\t ]+.+)/,lookbehind:!0,inside:{rest:e.languages.ruby}},{pattern:/((?:^|\r?\n|\r)([\t ]*)(?:[~-]|[&!]?=)).*\|[\t ]*((?:\r?\n|\r)\2[\t ]+.*\|[\t ]*)*/,lookbehind:!0,inside:{rest:e.languages.ruby}}],filter:{pattern:/((?:^|\r?\n|\r)([\t ]*)):[\w-]+((?:\r?\n|\r)(?:\2[\t ]+.+|\s*?(?=\r?\n|\r)))+/,lookbehind:!0,inside:{"filter-name":{pattern:/^:[\w-]+/,alias:"variable"}}},markup:{pattern:/((?:^|\r?\n|\r)[\t ]*)<.+/,lookbehind:!0,inside:{rest:e.languages.markup}},doctype:{pattern:/((?:^|\r?\n|\r)[\t ]*)!!!(?: .+)?/,lookbehind:!0},tag:{pattern:/((?:^|\r?\n|\r)[\t ]*)[%.#][\w\-#.]*[\w\-](?:\([^)]+\)|\{(?:\{[^}]+\}|[^}])+\}|\[[^\]]+\])*[\/<>]*/,lookbehind:!0,inside:{attributes:[{pattern:/(^|[^#])\{(?:\{[^}]+\}|[^}])+\}/,lookbehind:!0,inside:{rest:e.languages.ruby}},{pattern:/\([^)]+\)/,inside:{"attr-value":{pattern:/(=\s*)(?:"(?:\\?.)*?"|[^)\s]+)/,lookbehind:!0},"attr-name":/[\w:-]+(?=\s*!?=|\s*[,)])/,punctuation:/[=(),]/}},{pattern:/\[[^\]]+\]/,inside:{rest:e.languages.ruby}}],punctuation:/[<>]/}},code:{pattern:/((?:^|\r?\n|\r)[\t ]*(?:[~-]|[&!]?=)).+/,lookbehind:!0,inside:{rest:e.languages.ruby}},interpolation:{pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"},rest:e.languages.ruby}},punctuation:{pattern:/((?:^|\r?\n|\r)[\t ]*)[~=\-&!]+/,lookbehind:!0}};for(var t="((?:^|\\r?\\n|\\r)([\\t ]*)):{{filter_name}}((?:\\r?\\n|\\r)(?:\\2[\\t ]+.+|\\s*?(?=\\r?\\n|\\r)))+",r=["css",{filter:"coffee",language:"coffeescript"},"erb","javascript","less","markdown","ruby","scss","textile"],n={},a=0,i=r.length;i>a;a++){var l=r[a];l="string"==typeof l?{filter:l,language:l}:l,e.languages[l.language]&&(n["filter-"+l.filter]={pattern:RegExp(t.replace("{{filter_name}}",l.filter)),lookbehind:!0,inside:{"filter-name":{pattern:/^:[\w-]+/,alias:"variable"},rest:e.languages[l.language]}})}e.languages.insertBefore("haml","filter",n)}(Prism);
|
92
assets/js/components/prism-handlebars.js
Normal file
92
assets/js/components/prism-handlebars.js
Normal file
|
@ -0,0 +1,92 @@
|
|||
(function(Prism) {
|
||||
|
||||
var handlebars_pattern = /\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/g;
|
||||
|
||||
Prism.languages.handlebars = Prism.languages.extend('markup', {
|
||||
'handlebars': {
|
||||
pattern: handlebars_pattern,
|
||||
inside: {
|
||||
'delimiter': {
|
||||
pattern: /^\{\{\{?|\}\}\}?$/i,
|
||||
alias: 'punctuation'
|
||||
},
|
||||
'string': /(["'])(\\?.)*?\1/,
|
||||
'number': /\b-?(0x[\dA-Fa-f]+|\d*\.?\d+([Ee][+-]?\d+)?)\b/,
|
||||
'boolean': /\b(true|false)\b/,
|
||||
'block': {
|
||||
pattern: /^(\s*~?\s*)[#\/]\S+?(?=\s*~?\s*$|\s)/i,
|
||||
lookbehind: true,
|
||||
alias: 'keyword'
|
||||
},
|
||||
'brackets': {
|
||||
pattern: /\[[^\]]+\]/,
|
||||
inside: {
|
||||
punctuation: /\[|\]/,
|
||||
variable: /[\s\S]+/
|
||||
}
|
||||
},
|
||||
'punctuation': /[!"#%&'()*+,.\/;<=>@\[\\\]^`{|}~]/,
|
||||
'variable': /[^!"#%&'()*+,.\/;<=>@\[\\\]^`{|}~\s]+/
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Comments are inserted at top so that they can
|
||||
// surround markup
|
||||
Prism.languages.insertBefore('handlebars', 'tag', {
|
||||
'handlebars-comment': {
|
||||
pattern: /\{\{![\s\S]*?\}\}/,
|
||||
alias: ['handlebars','comment']
|
||||
}
|
||||
});
|
||||
|
||||
// Tokenize all inline Handlebars expressions that are wrapped in {{ }} or {{{ }}}
|
||||
// This allows for easy Handlebars + markup highlighting
|
||||
Prism.hooks.add('before-highlight', function(env) {
|
||||
if (env.language !== 'handlebars') {
|
||||
return;
|
||||
}
|
||||
|
||||
env.tokenStack = [];
|
||||
|
||||
env.backupCode = env.code;
|
||||
env.code = env.code.replace(handlebars_pattern, function(match) {
|
||||
var i = env.tokenStack.length;
|
||||
// Check for existing strings
|
||||
while (env.backupCode.indexOf('___HANDLEBARS' + i + '___') !== -1)
|
||||
++i;
|
||||
|
||||
// Create a sparse array
|
||||
env.tokenStack[i] = match;
|
||||
|
||||
return '___HANDLEBARS' + i + '___';
|
||||
});
|
||||
});
|
||||
|
||||
// Restore env.code for other plugins (e.g. line-numbers)
|
||||
Prism.hooks.add('before-insert', function(env) {
|
||||
if (env.language === 'handlebars') {
|
||||
env.code = env.backupCode;
|
||||
delete env.backupCode;
|
||||
}
|
||||
});
|
||||
|
||||
// Re-insert the tokens after highlighting
|
||||
// and highlight them with defined grammar
|
||||
Prism.hooks.add('after-highlight', function(env) {
|
||||
if (env.language !== 'handlebars') {
|
||||
return;
|
||||
}
|
||||
|
||||
for (var i = 0, keys = Object.keys(env.tokenStack); i < keys.length; ++i) {
|
||||
var k = keys[i];
|
||||
var t = env.tokenStack[k];
|
||||
|
||||
// The replace prevents $$, $&, $`, $', $n, $nn from being interpreted as special patterns
|
||||
env.highlightedCode = env.highlightedCode.replace('___HANDLEBARS' + k + '___', Prism.highlight(t, env.grammar, 'handlebars').replace(/\$/g, '$$$$'));
|
||||
}
|
||||
|
||||
env.element.innerHTML = env.highlightedCode;
|
||||
});
|
||||
|
||||
}(Prism));
|
1
assets/js/components/prism-handlebars.min.js
vendored
Normal file
1
assets/js/components/prism-handlebars.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
!function(e){var a=/\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/g;e.languages.handlebars=e.languages.extend("markup",{handlebars:{pattern:a,inside:{delimiter:{pattern:/^\{\{\{?|\}\}\}?$/i,alias:"punctuation"},string:/(["'])(\\?.)*?\1/,number:/\b-?(0x[\dA-Fa-f]+|\d*\.?\d+([Ee][+-]?\d+)?)\b/,"boolean":/\b(true|false)\b/,block:{pattern:/^(\s*~?\s*)[#\/]\S+?(?=\s*~?\s*$|\s)/i,lookbehind:!0,alias:"keyword"},brackets:{pattern:/\[[^\]]+\]/,inside:{punctuation:/\[|\]/,variable:/[\s\S]+/}},punctuation:/[!"#%&'()*+,.\/;<=>@\[\\\]^`{|}~]/,variable:/[^!"#%&'()*+,.\/;<=>@\[\\\]^`{|}~\s]+/}}}),e.languages.insertBefore("handlebars","tag",{"handlebars-comment":{pattern:/\{\{![\s\S]*?\}\}/,alias:["handlebars","comment"]}}),e.hooks.add("before-highlight",function(e){"handlebars"===e.language&&(e.tokenStack=[],e.backupCode=e.code,e.code=e.code.replace(a,function(a){for(var n=e.tokenStack.length;-1!==e.backupCode.indexOf("___HANDLEBARS"+n+"___");)++n;return e.tokenStack[n]=a,"___HANDLEBARS"+n+"___"}))}),e.hooks.add("before-insert",function(e){"handlebars"===e.language&&(e.code=e.backupCode,delete e.backupCode)}),e.hooks.add("after-highlight",function(a){if("handlebars"===a.language){for(var n=0,t=Object.keys(a.tokenStack);n<t.length;++n){var r=t[n],o=a.tokenStack[r];a.highlightedCode=a.highlightedCode.replace("___HANDLEBARS"+r+"___",e.highlight(o,a.grammar,"handlebars").replace(/\$/g,"$$$$"))}a.element.innerHTML=a.highlightedCode}})}(Prism);
|
35
assets/js/components/prism-haskell.js
Normal file
35
assets/js/components/prism-haskell.js
Normal file
|
@ -0,0 +1,35 @@
|
|||
Prism.languages.haskell= {
|
||||
'comment': {
|
||||
pattern: /(^|[^-!#$%*+=?&@|~.:<>^\\\/])(--[^-!#$%*+=?&@|~.:<>^\\\/].*|{-[\s\S]*?-})/m,
|
||||
lookbehind: true
|
||||
},
|
||||
'char': /'([^\\']|\\([abfnrtv\\"'&]|\^[A-Z@[\]\^_]|NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|\d+|o[0-7]+|x[0-9a-fA-F]+))'/,
|
||||
'string': {
|
||||
pattern: /"([^\\"]|\\([abfnrtv\\"'&]|\^[A-Z@[\]\^_]|NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|\d+|o[0-7]+|x[0-9a-fA-F]+)|\\\s+\\)*"/,
|
||||
greedy: true
|
||||
},
|
||||
'keyword' : /\b(case|class|data|deriving|do|else|if|in|infixl|infixr|instance|let|module|newtype|of|primitive|then|type|where)\b/,
|
||||
'import_statement' : {
|
||||
// The imported or hidden names are not included in this import
|
||||
// statement. This is because we want to highlight those exactly like
|
||||
// we do for the names in the program.
|
||||
pattern: /(\r?\n|\r|^)\s*import\s+(qualified\s+)?([A-Z][_a-zA-Z0-9']*)(\.[A-Z][_a-zA-Z0-9']*)*(\s+as\s+([A-Z][_a-zA-Z0-9']*)(\.[A-Z][_a-zA-Z0-9']*)*)?(\s+hiding\b)?/m,
|
||||
inside: {
|
||||
'keyword': /\b(import|qualified|as|hiding)\b/
|
||||
}
|
||||
},
|
||||
// These are builtin variables only. Constructors are highlighted later as a constant.
|
||||
'builtin': /\b(abs|acos|acosh|all|and|any|appendFile|approxRational|asTypeOf|asin|asinh|atan|atan2|atanh|basicIORun|break|catch|ceiling|chr|compare|concat|concatMap|const|cos|cosh|curry|cycle|decodeFloat|denominator|digitToInt|div|divMod|drop|dropWhile|either|elem|encodeFloat|enumFrom|enumFromThen|enumFromThenTo|enumFromTo|error|even|exp|exponent|fail|filter|flip|floatDigits|floatRadix|floatRange|floor|fmap|foldl|foldl1|foldr|foldr1|fromDouble|fromEnum|fromInt|fromInteger|fromIntegral|fromRational|fst|gcd|getChar|getContents|getLine|group|head|id|inRange|index|init|intToDigit|interact|ioError|isAlpha|isAlphaNum|isAscii|isControl|isDenormalized|isDigit|isHexDigit|isIEEE|isInfinite|isLower|isNaN|isNegativeZero|isOctDigit|isPrint|isSpace|isUpper|iterate|last|lcm|length|lex|lexDigits|lexLitChar|lines|log|logBase|lookup|map|mapM|mapM_|max|maxBound|maximum|maybe|min|minBound|minimum|mod|negate|not|notElem|null|numerator|odd|or|ord|otherwise|pack|pi|pred|primExitWith|print|product|properFraction|putChar|putStr|putStrLn|quot|quotRem|range|rangeSize|read|readDec|readFile|readFloat|readHex|readIO|readInt|readList|readLitChar|readLn|readOct|readParen|readSigned|reads|readsPrec|realToFrac|recip|rem|repeat|replicate|return|reverse|round|scaleFloat|scanl|scanl1|scanr|scanr1|seq|sequence|sequence_|show|showChar|showInt|showList|showLitChar|showParen|showSigned|showString|shows|showsPrec|significand|signum|sin|sinh|snd|sort|span|splitAt|sqrt|subtract|succ|sum|tail|take|takeWhile|tan|tanh|threadToIOResult|toEnum|toInt|toInteger|toLower|toRational|toUpper|truncate|uncurry|undefined|unlines|until|unwords|unzip|unzip3|userError|words|writeFile|zip|zip3|zipWith|zipWith3)\b/,
|
||||
// decimal integers and floating point numbers | octal integers | hexadecimal integers
|
||||
'number' : /\b(\d+(\.\d+)?(e[+-]?\d+)?|0o[0-7]+|0x[0-9a-f]+)\b/i,
|
||||
// Most of this is needed because of the meaning of a single '.'.
|
||||
// If it stands alone freely, it is the function composition.
|
||||
// It may also be a separator between a module name and an identifier => no
|
||||
// operator. If it comes together with other special characters it is an
|
||||
// operator too.
|
||||
'operator' : /\s\.\s|[-!#$%*+=?&@|~.:<>^\\\/]*\.[-!#$%*+=?&@|~.:<>^\\\/]+|[-!#$%*+=?&@|~.:<>^\\\/]+\.[-!#$%*+=?&@|~.:<>^\\\/]*|[-!#$%*+=?&@|~:<>^\\\/]+|`([A-Z][_a-zA-Z0-9']*\.)*[_a-z][_a-zA-Z0-9']*`/,
|
||||
// In Haskell, nearly everything is a variable, do not highlight these.
|
||||
'hvariable': /\b([A-Z][_a-zA-Z0-9']*\.)*[_a-z][_a-zA-Z0-9']*\b/,
|
||||
'constant': /\b([A-Z][_a-zA-Z0-9']*\.)*[A-Z][_a-zA-Z0-9']*\b/,
|
||||
'punctuation' : /[{}[\];(),.:]/
|
||||
};
|
1
assets/js/components/prism-haskell.min.js
vendored
Normal file
1
assets/js/components/prism-haskell.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
Prism.languages.haskell={comment:{pattern:/(^|[^-!#$%*+=?&@|~.:<>^\\\/])(--[^-!#$%*+=?&@|~.:<>^\\\/].*|{-[\s\S]*?-})/m,lookbehind:!0},"char":/'([^\\']|\\([abfnrtv\\"'&]|\^[A-Z@[\]\^_]|NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|\d+|o[0-7]+|x[0-9a-fA-F]+))'/,string:{pattern:/"([^\\"]|\\([abfnrtv\\"'&]|\^[A-Z@[\]\^_]|NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|\d+|o[0-7]+|x[0-9a-fA-F]+)|\\\s+\\)*"/,greedy:!0},keyword:/\b(case|class|data|deriving|do|else|if|in|infixl|infixr|instance|let|module|newtype|of|primitive|then|type|where)\b/,import_statement:{pattern:/(\r?\n|\r|^)\s*import\s+(qualified\s+)?([A-Z][_a-zA-Z0-9']*)(\.[A-Z][_a-zA-Z0-9']*)*(\s+as\s+([A-Z][_a-zA-Z0-9']*)(\.[A-Z][_a-zA-Z0-9']*)*)?(\s+hiding\b)?/m,inside:{keyword:/\b(import|qualified|as|hiding)\b/}},builtin:/\b(abs|acos|acosh|all|and|any|appendFile|approxRational|asTypeOf|asin|asinh|atan|atan2|atanh|basicIORun|break|catch|ceiling|chr|compare|concat|concatMap|const|cos|cosh|curry|cycle|decodeFloat|denominator|digitToInt|div|divMod|drop|dropWhile|either|elem|encodeFloat|enumFrom|enumFromThen|enumFromThenTo|enumFromTo|error|even|exp|exponent|fail|filter|flip|floatDigits|floatRadix|floatRange|floor|fmap|foldl|foldl1|foldr|foldr1|fromDouble|fromEnum|fromInt|fromInteger|fromIntegral|fromRational|fst|gcd|getChar|getContents|getLine|group|head|id|inRange|index|init|intToDigit|interact|ioError|isAlpha|isAlphaNum|isAscii|isControl|isDenormalized|isDigit|isHexDigit|isIEEE|isInfinite|isLower|isNaN|isNegativeZero|isOctDigit|isPrint|isSpace|isUpper|iterate|last|lcm|length|lex|lexDigits|lexLitChar|lines|log|logBase|lookup|map|mapM|mapM_|max|maxBound|maximum|maybe|min|minBound|minimum|mod|negate|not|notElem|null|numerator|odd|or|ord|otherwise|pack|pi|pred|primExitWith|print|product|properFraction|putChar|putStr|putStrLn|quot|quotRem|range|rangeSize|read|readDec|readFile|readFloat|readHex|readIO|readInt|readList|readLitChar|readLn|readOct|readParen|readSigned|reads|readsPrec|realToFrac|recip|rem|repeat|replicate|return|reverse|round|scaleFloat|scanl|scanl1|scanr|scanr1|seq|sequence|sequence_|show|showChar|showInt|showList|showLitChar|showParen|showSigned|showString|shows|showsPrec|significand|signum|sin|sinh|snd|sort|span|splitAt|sqrt|subtract|succ|sum|tail|take|takeWhile|tan|tanh|threadToIOResult|toEnum|toInt|toInteger|toLower|toRational|toUpper|truncate|uncurry|undefined|unlines|until|unwords|unzip|unzip3|userError|words|writeFile|zip|zip3|zipWith|zipWith3)\b/,number:/\b(\d+(\.\d+)?(e[+-]?\d+)?|0o[0-7]+|0x[0-9a-f]+)\b/i,operator:/\s\.\s|[-!#$%*+=?&@|~.:<>^\\\/]*\.[-!#$%*+=?&@|~.:<>^\\\/]+|[-!#$%*+=?&@|~.:<>^\\\/]+\.[-!#$%*+=?&@|~.:<>^\\\/]*|[-!#$%*+=?&@|~:<>^\\\/]+|`([A-Z][_a-zA-Z0-9']*\.)*[_a-z][_a-zA-Z0-9']*`/,hvariable:/\b([A-Z][_a-zA-Z0-9']*\.)*[_a-z][_a-zA-Z0-9']*\b/,constant:/\b([A-Z][_a-zA-Z0-9']*\.)*[A-Z][_a-zA-Z0-9']*\b/,punctuation:/[{}[\];(),.:]/};
|
45
assets/js/components/prism-haxe.js
Normal file
45
assets/js/components/prism-haxe.js
Normal file
|
@ -0,0 +1,45 @@
|
|||
Prism.languages.haxe = Prism.languages.extend('clike', {
|
||||
// Strings can be multi-line
|
||||
'string': {
|
||||
pattern: /(["'])(?:(?!\1)[^\\]|\\[\s\S])*\1/,
|
||||
greedy: true,
|
||||
inside: {
|
||||
'interpolation': {
|
||||
pattern: /(^|[^\\])\$(?:\w+|\{[^}]+\})/,
|
||||
lookbehind: true,
|
||||
inside: {
|
||||
'interpolation': {
|
||||
pattern: /^\$\w*/,
|
||||
alias: 'variable'
|
||||
}
|
||||
// See rest below
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
// The final look-ahead prevents highlighting of keywords if expressions such as "haxe.macro.Expr"
|
||||
'keyword': /\bthis\b|\b(?:abstract|as|break|case|cast|catch|class|continue|default|do|dynamic|else|enum|extends|extern|from|for|function|if|implements|import|in|inline|interface|macro|new|null|override|public|private|return|static|super|switch|throw|to|try|typedef|using|var|while)(?!\.)\b/,
|
||||
'operator': /\.{3}|\+\+?|-[->]?|[=!]=?|&&?|\|\|?|<[<=]?|>[>=]?|[*\/%~^]/
|
||||
});
|
||||
Prism.languages.insertBefore('haxe', 'class-name', {
|
||||
'regex': {
|
||||
pattern: /~\/(?:[^\/\\\r\n]|\\.)+\/[igmsu]*/,
|
||||
greedy: true
|
||||
}
|
||||
});
|
||||
Prism.languages.insertBefore('haxe', 'keyword', {
|
||||
'preprocessor': {
|
||||
pattern: /#\w+/,
|
||||
alias: 'builtin'
|
||||
},
|
||||
'metadata': {
|
||||
pattern: /@:?\w+/,
|
||||
alias: 'symbol'
|
||||
},
|
||||
'reification': {
|
||||
pattern: /\$(?:\w+|(?=\{))/,
|
||||
alias: 'variable'
|
||||
}
|
||||
});
|
||||
Prism.languages.haxe['string'].inside['interpolation'].inside.rest = Prism.util.clone(Prism.languages.haxe);
|
||||
delete Prism.languages.haxe['class-name'];
|
1
assets/js/components/prism-haxe.min.js
vendored
Normal file
1
assets/js/components/prism-haxe.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
Prism.languages.haxe=Prism.languages.extend("clike",{string:{pattern:/(["'])(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0,inside:{interpolation:{pattern:/(^|[^\\])\$(?:\w+|\{[^}]+\})/,lookbehind:!0,inside:{interpolation:{pattern:/^\$\w*/,alias:"variable"}}}}},keyword:/\bthis\b|\b(?:abstract|as|break|case|cast|catch|class|continue|default|do|dynamic|else|enum|extends|extern|from|for|function|if|implements|import|in|inline|interface|macro|new|null|override|public|private|return|static|super|switch|throw|to|try|typedef|using|var|while)(?!\.)\b/,operator:/\.{3}|\+\+?|-[->]?|[=!]=?|&&?|\|\|?|<[<=]?|>[>=]?|[*\/%~^]/}),Prism.languages.insertBefore("haxe","class-name",{regex:{pattern:/~\/(?:[^\/\\\r\n]|\\.)+\/[igmsu]*/,greedy:!0}}),Prism.languages.insertBefore("haxe","keyword",{preprocessor:{pattern:/#\w+/,alias:"builtin"},metadata:{pattern:/@:?\w+/,alias:"symbol"},reification:{pattern:/\$(?:\w+|(?=\{))/,alias:"variable"}}),Prism.languages.haxe.string.inside.interpolation.inside.rest=Prism.util.clone(Prism.languages.haxe),delete Prism.languages.haxe["class-name"];
|
50
assets/js/components/prism-http.js
Normal file
50
assets/js/components/prism-http.js
Normal file
|
@ -0,0 +1,50 @@
|
|||
Prism.languages.http = {
|
||||
'request-line': {
|
||||
pattern: /^(POST|GET|PUT|DELETE|OPTIONS|PATCH|TRACE|CONNECT)\b\shttps?:\/\/\S+\sHTTP\/[0-9.]+/m,
|
||||
inside: {
|
||||
// HTTP Verb
|
||||
property: /^(POST|GET|PUT|DELETE|OPTIONS|PATCH|TRACE|CONNECT)\b/,
|
||||
// Path or query argument
|
||||
'attr-name': /:\w+/
|
||||
}
|
||||
},
|
||||
'response-status': {
|
||||
pattern: /^HTTP\/1.[01] \d+.*/m,
|
||||
inside: {
|
||||
// Status, e.g. 200 OK
|
||||
property: {
|
||||
pattern: /(^HTTP\/1.[01] )\d+.*/i,
|
||||
lookbehind: true
|
||||
}
|
||||
}
|
||||
},
|
||||
// HTTP header name
|
||||
'header-name': {
|
||||
pattern: /^[\w-]+:(?=.)/m,
|
||||
alias: 'keyword'
|
||||
}
|
||||
};
|
||||
|
||||
// Create a mapping of Content-Type headers to language definitions
|
||||
var httpLanguages = {
|
||||
'application/json': Prism.languages.javascript,
|
||||
'application/xml': Prism.languages.markup,
|
||||
'text/xml': Prism.languages.markup,
|
||||
'text/html': Prism.languages.markup
|
||||
};
|
||||
|
||||
// Insert each content type parser that has its associated language
|
||||
// currently loaded.
|
||||
for (var contentType in httpLanguages) {
|
||||
if (httpLanguages[contentType]) {
|
||||
var options = {};
|
||||
options[contentType] = {
|
||||
pattern: new RegExp('(content-type:\\s*' + contentType + '[\\w\\W]*?)(?:\\r?\\n|\\r){2}[\\w\\W]*', 'i'),
|
||||
lookbehind: true,
|
||||
inside: {
|
||||
rest: httpLanguages[contentType]
|
||||
}
|
||||
};
|
||||
Prism.languages.insertBefore('http', 'header-name', options);
|
||||
}
|
||||
}
|
1
assets/js/components/prism-http.min.js
vendored
Normal file
1
assets/js/components/prism-http.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
Prism.languages.http={"request-line":{pattern:/^(POST|GET|PUT|DELETE|OPTIONS|PATCH|TRACE|CONNECT)\b\shttps?:\/\/\S+\sHTTP\/[0-9.]+/m,inside:{property:/^(POST|GET|PUT|DELETE|OPTIONS|PATCH|TRACE|CONNECT)\b/,"attr-name":/:\w+/}},"response-status":{pattern:/^HTTP\/1.[01] \d+.*/m,inside:{property:{pattern:/(^HTTP\/1.[01] )\d+.*/i,lookbehind:!0}}},"header-name":{pattern:/^[\w-]+:(?=.)/m,alias:"keyword"}};var httpLanguages={"application/json":Prism.languages.javascript,"application/xml":Prism.languages.markup,"text/xml":Prism.languages.markup,"text/html":Prism.languages.markup};for(var contentType in httpLanguages)if(httpLanguages[contentType]){var options={};options[contentType]={pattern:new RegExp("(content-type:\\s*"+contentType+"[\\w\\W]*?)(?:\\r?\\n|\\r){2}[\\w\\W]*","i"),lookbehind:!0,inside:{rest:httpLanguages[contentType]}},Prism.languages.insertBefore("http","header-name",options)}
|
20
assets/js/components/prism-icon.js
Normal file
20
assets/js/components/prism-icon.js
Normal file
|
@ -0,0 +1,20 @@
|
|||
Prism.languages.icon = {
|
||||
'comment': /#.*/,
|
||||
'string': {
|
||||
pattern: /(["'])(?:(?!\1)[^\\\r\n]|\\.|_(?:\r?\n|\r))*\1/,
|
||||
greedy: true
|
||||
},
|
||||
'number': /\b(?:\d+r[a-z\d]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b|\.\d+\b/i,
|
||||
'builtin-keyword': {
|
||||
pattern: /&(?:allocated|ascii|clock|collections|cset|current|date|dateline|digits|dump|e|error(?:number|text|value)?|errout|fail|features|file|host|input|lcase|letters|level|line|main|null|output|phi|pi|pos|progname|random|regions|source|storage|subject|time|trace|ucase|version)\b/,
|
||||
alias: 'variable'
|
||||
},
|
||||
'directive': {
|
||||
pattern: /\$\w+/,
|
||||
alias: 'builtin'
|
||||
},
|
||||
'keyword': /\b(?:break|by|case|create|default|do|else|end|every|fail|global|if|initial|invocable|link|local|next|not|of|procedure|record|repeat|return|static|suspend|then|to|until|while)\b/,
|
||||
'function': /(?!\d)\w+(?=\s*[({]|\s*!\s*\[)/,
|
||||
'operator': /[+-]:(?!=)|(?:[\/?@^%&]|\+\+?|--?|==?=?|~==?=?|\*\*?|\|\|\|?|<(?:->?|<?=?)|>>?=?)(?::=)?|:(?:=:?)?|[!.\\|~]/,
|
||||
'punctuation': /[\[\](){},;]/
|
||||
};
|
1
assets/js/components/prism-icon.min.js
vendored
Normal file
1
assets/js/components/prism-icon.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
Prism.languages.icon={comment:/#.*/,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\.|_(?:\r?\n|\r))*\1/,greedy:!0},number:/\b(?:\d+r[a-z\d]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b|\.\d+\b/i,"builtin-keyword":{pattern:/&(?:allocated|ascii|clock|collections|cset|current|date|dateline|digits|dump|e|error(?:number|text|value)?|errout|fail|features|file|host|input|lcase|letters|level|line|main|null|output|phi|pi|pos|progname|random|regions|source|storage|subject|time|trace|ucase|version)\b/,alias:"variable"},directive:{pattern:/\$\w+/,alias:"builtin"},keyword:/\b(?:break|by|case|create|default|do|else|end|every|fail|global|if|initial|invocable|link|local|next|not|of|procedure|record|repeat|return|static|suspend|then|to|until|while)\b/,"function":/(?!\d)\w+(?=\s*[({]|\s*!\s*\[)/,operator:/[+-]:(?!=)|(?:[\/?@^%&]|\+\+?|--?|==?=?|~==?=?|\*\*?|\|\|\|?|<(?:->?|<?=?)|>>?=?)(?::=)?|:(?:=:?)?|[!.\\|~]/,punctuation:/[\[\](){},;]/};
|
61
assets/js/components/prism-inform7.js
Normal file
61
assets/js/components/prism-inform7.js
Normal file
|
@ -0,0 +1,61 @@
|
|||
Prism.languages.inform7 = {
|
||||
'string': {
|
||||
pattern: /"[^"]*"/,
|
||||
inside: {
|
||||
'substitution': {
|
||||
pattern: /\[[^\]]+\]/,
|
||||
inside: {
|
||||
'delimiter': {
|
||||
pattern:/\[|\]/,
|
||||
alias: 'punctuation'
|
||||
}
|
||||
// See rest below
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
'comment': {
|
||||
pattern: /\[[^\]]+\]/,
|
||||
greedy: true
|
||||
},
|
||||
'title': {
|
||||
pattern: /^[ \t]*(?:volume|book|part(?! of)|chapter|section|table)\b.+/im,
|
||||
alias: 'important'
|
||||
},
|
||||
'number': {
|
||||
pattern: /(^|[^-])(?:(?:\b|-)\d+(?:\.\d+)?(?:\^\d+)?\w*|\b(?:one|two|three|four|five|six|seven|eight|nine|ten|eleven|twelve))\b(?!-)/i,
|
||||
lookbehind: true
|
||||
},
|
||||
'verb': {
|
||||
pattern: /(^|[^-])\b(?:applying to|are|attacking|answering|asking|be(?:ing)?|burning|buying|called|carries|carry(?! out)|carrying|climbing|closing|conceal(?:s|ing)?|consulting|contain(?:s|ing)?|cutting|drinking|dropping|eating|enclos(?:es?|ing)|entering|examining|exiting|getting|giving|going|ha(?:ve|s|ving)|hold(?:s|ing)?|impl(?:y|ies)|incorporat(?:es?|ing)|inserting|is|jumping|kissing|listening|locking|looking|mean(?:s|ing)?|opening|provid(?:es?|ing)|pulling|pushing|putting|relat(?:es?|ing)|removing|searching|see(?:s|ing)?|setting|showing|singing|sleeping|smelling|squeezing|switching|support(?:s|ing)?|swearing|taking|tasting|telling|thinking|throwing|touching|turning|tying|unlock(?:s|ing)?|var(?:y|ies|ying)|waiting|waking|waving|wear(?:s|ing)?)\b(?!-)/i,
|
||||
lookbehind: true,
|
||||
alias: 'operator'
|
||||
},
|
||||
'keyword': {
|
||||
pattern: /(^|[^-])\b(?:after|before|carry out|check|continue the action|definition(?= *:)|do nothing|else|end (?:if|unless|the story)|every turn|if|include|instead(?: of)?|let|move|no|now|otherwise|repeat|report|resume the story|rule for|running through|say(?:ing)?|stop the action|test|try(?:ing)?|understand|unless|use|when|while|yes)\b(?!-)/i,
|
||||
lookbehind: true
|
||||
},
|
||||
'property': {
|
||||
pattern: /(^|[^-])\b(?:adjacent(?! to)|carried|closed|concealed|contained|dark|described|edible|empty|enclosed|enterable|even|female|fixed in place|full|handled|held|improper-named|incorporated|inedible|invisible|lighted|lit|lock(?:able|ed)|male|marked for listing|mentioned|negative|neuter|non-(?:empty|full|recurring)|odd|opaque|open(?:able)?|plural-named|portable|positive|privately-named|proper-named|provided|publically-named|pushable between rooms|recurring|related|rubbing|scenery|seen|singular-named|supported|swinging|switch(?:able|ed(?: on| off)?)|touch(?:able|ed)|transparent|unconcealed|undescribed|unlit|unlocked|unmarked for listing|unmentioned|unopenable|untouchable|unvisited|variable|visible|visited|wearable|worn)\b(?!-)/i,
|
||||
lookbehind: true,
|
||||
alias: 'symbol'
|
||||
},
|
||||
'position': {
|
||||
pattern: /(^|[^-])\b(?:above|adjacent to|back side of|below|between|down|east|everywhere|front side|here|in|inside(?: from)?|north(?:east|west)?|nowhere|on(?: top of)?|other side|outside(?: from)?|parts? of|regionally in|south(?:east|west)?|through|up|west|within)\b(?!-)/i,
|
||||
lookbehind: true,
|
||||
alias: 'keyword'
|
||||
},
|
||||
'type': {
|
||||
pattern: /(^|[^-])\b(?:actions?|activit(?:y|ies)|actors?|animals?|backdrops?|containers?|devices?|directions?|doors?|holders?|kinds?|lists?|m[ae]n|nobody|nothing|nouns?|numbers?|objects?|people|persons?|player(?:'s holdall)?|regions?|relations?|rooms?|rule(?:book)?s?|scenes?|someone|something|supporters?|tables?|texts?|things?|time|vehicles?|wom[ae]n)\b(?!-)/i,
|
||||
lookbehind: true,
|
||||
alias: 'variable'
|
||||
},
|
||||
'punctuation': /[.,:;(){}]/
|
||||
};
|
||||
|
||||
Prism.languages.inform7['string'].inside['substitution'].inside.rest = Prism.util.clone(Prism.languages.inform7);
|
||||
// We don't want the remaining text in the substitution to be highlighted as the string.
|
||||
Prism.languages.inform7['string'].inside['substitution'].inside.rest.text = {
|
||||
pattern: /\S(?:\s*\S)*/,
|
||||
alias: 'comment'
|
||||
};
|
1
assets/js/components/prism-inform7.min.js
vendored
Normal file
1
assets/js/components/prism-inform7.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
Prism.languages.inform7={string:{pattern:/"[^"]*"/,inside:{substitution:{pattern:/\[[^\]]+\]/,inside:{delimiter:{pattern:/\[|\]/,alias:"punctuation"}}}}},comment:{pattern:/\[[^\]]+\]/,greedy:!0},title:{pattern:/^[ \t]*(?:volume|book|part(?! of)|chapter|section|table)\b.+/im,alias:"important"},number:{pattern:/(^|[^-])(?:(?:\b|-)\d+(?:\.\d+)?(?:\^\d+)?\w*|\b(?:one|two|three|four|five|six|seven|eight|nine|ten|eleven|twelve))\b(?!-)/i,lookbehind:!0},verb:{pattern:/(^|[^-])\b(?:applying to|are|attacking|answering|asking|be(?:ing)?|burning|buying|called|carries|carry(?! out)|carrying|climbing|closing|conceal(?:s|ing)?|consulting|contain(?:s|ing)?|cutting|drinking|dropping|eating|enclos(?:es?|ing)|entering|examining|exiting|getting|giving|going|ha(?:ve|s|ving)|hold(?:s|ing)?|impl(?:y|ies)|incorporat(?:es?|ing)|inserting|is|jumping|kissing|listening|locking|looking|mean(?:s|ing)?|opening|provid(?:es?|ing)|pulling|pushing|putting|relat(?:es?|ing)|removing|searching|see(?:s|ing)?|setting|showing|singing|sleeping|smelling|squeezing|switching|support(?:s|ing)?|swearing|taking|tasting|telling|thinking|throwing|touching|turning|tying|unlock(?:s|ing)?|var(?:y|ies|ying)|waiting|waking|waving|wear(?:s|ing)?)\b(?!-)/i,lookbehind:!0,alias:"operator"},keyword:{pattern:/(^|[^-])\b(?:after|before|carry out|check|continue the action|definition(?= *:)|do nothing|else|end (?:if|unless|the story)|every turn|if|include|instead(?: of)?|let|move|no|now|otherwise|repeat|report|resume the story|rule for|running through|say(?:ing)?|stop the action|test|try(?:ing)?|understand|unless|use|when|while|yes)\b(?!-)/i,lookbehind:!0},property:{pattern:/(^|[^-])\b(?:adjacent(?! to)|carried|closed|concealed|contained|dark|described|edible|empty|enclosed|enterable|even|female|fixed in place|full|handled|held|improper-named|incorporated|inedible|invisible|lighted|lit|lock(?:able|ed)|male|marked for listing|mentioned|negative|neuter|non-(?:empty|full|recurring)|odd|opaque|open(?:able)?|plural-named|portable|positive|privately-named|proper-named|provided|publically-named|pushable between rooms|recurring|related|rubbing|scenery|seen|singular-named|supported|swinging|switch(?:able|ed(?: on| off)?)|touch(?:able|ed)|transparent|unconcealed|undescribed|unlit|unlocked|unmarked for listing|unmentioned|unopenable|untouchable|unvisited|variable|visible|visited|wearable|worn)\b(?!-)/i,lookbehind:!0,alias:"symbol"},position:{pattern:/(^|[^-])\b(?:above|adjacent to|back side of|below|between|down|east|everywhere|front side|here|in|inside(?: from)?|north(?:east|west)?|nowhere|on(?: top of)?|other side|outside(?: from)?|parts? of|regionally in|south(?:east|west)?|through|up|west|within)\b(?!-)/i,lookbehind:!0,alias:"keyword"},type:{pattern:/(^|[^-])\b(?:actions?|activit(?:y|ies)|actors?|animals?|backdrops?|containers?|devices?|directions?|doors?|holders?|kinds?|lists?|m[ae]n|nobody|nothing|nouns?|numbers?|objects?|people|persons?|player(?:'s holdall)?|regions?|relations?|rooms?|rule(?:book)?s?|scenes?|someone|something|supporters?|tables?|texts?|things?|time|vehicles?|wom[ae]n)\b(?!-)/i,lookbehind:!0,alias:"variable"},punctuation:/[.,:;(){}]/},Prism.languages.inform7.string.inside.substitution.inside.rest=Prism.util.clone(Prism.languages.inform7),Prism.languages.inform7.string.inside.substitution.inside.rest.text={pattern:/\S(?:\s*\S)*/,alias:"comment"};
|
11
assets/js/components/prism-ini.js
Normal file
11
assets/js/components/prism-ini.js
Normal file
|
@ -0,0 +1,11 @@
|
|||
Prism.languages.ini= {
|
||||
'comment': /^[ \t]*;.*$/m,
|
||||
'selector': /^[ \t]*\[.*?\]/m,
|
||||
'constant': /^[ \t]*[^\s=]+?(?=[ \t]*=)/m,
|
||||
'attr-value': {
|
||||
pattern: /=.*/,
|
||||
inside: {
|
||||
'punctuation': /^[=]/
|
||||
}
|
||||
}
|
||||
};
|
1
assets/js/components/prism-ini.min.js
vendored
Normal file
1
assets/js/components/prism-ini.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
Prism.languages.ini={comment:/^[ \t]*;.*$/m,selector:/^[ \t]*\[.*?\]/m,constant:/^[ \t]*[^\s=]+?(?=[ \t]*=)/m,"attr-value":{pattern:/=.*/,inside:{punctuation:/^[=]/}}};
|
25
assets/js/components/prism-j.js
Normal file
25
assets/js/components/prism-j.js
Normal file
|
@ -0,0 +1,25 @@
|
|||
Prism.languages.j = {
|
||||
'comment': /\bNB\..*/,
|
||||
'string': {
|
||||
pattern: /'(?:''|[^'\r\n])*'/,
|
||||
greedy: true
|
||||
},
|
||||
'keyword': /\b(?:(?:adverb|conjunction|CR|def|define|dyad|LF|monad|noun|verb)\b|(?:assert|break|case|catch[dt]?|continue|do|else|elseif|end|fcase|for|for_\w+|goto_\w+|if|label_\w+|return|select|throw|try|while|whilst)\.)/,
|
||||
'verb': {
|
||||
// Negative look-ahead prevents bad highlighting
|
||||
// of ^: ;. =. =: !. !:
|
||||
pattern: /(?!\^:|;\.|[=!][.:])(?:\{(?:\.|::?)?|p(?:\.\.?|:)|[=!\]]|[<>+*\-%$|,#][.:]?|[\^?]\.?|[;\[]:?|[~}"i][.:]|[ACeEIjLor]\.|(?:[_\/\\qsux]|_?\d):)/,
|
||||
alias: 'keyword'
|
||||
},
|
||||
'number': /\b_?(?:(?!\d:)\d+(?:\.\d+)?(?:(?:[ejpx]|ad|ar)_?\d+(?:\.\d+)?)*(?:b_?[\da-z]+(?:\.[\da-z]+)?)?|_(?!\.))/,
|
||||
'adverb': {
|
||||
pattern: /[~}]|[\/\\]\.?|[bfM]\.|t[.:]/,
|
||||
alias: 'builtin'
|
||||
},
|
||||
'operator': /[=a][.:]|_\./,
|
||||
'conjunction': {
|
||||
pattern: /&(?:\.:?|:)?|[.:@][.:]?|[!D][.:]|[;dHT]\.|`:?|[\^LS]:|"/,
|
||||
alias: 'variable'
|
||||
},
|
||||
'punctuation': /[()]/
|
||||
};
|
1
assets/js/components/prism-j.min.js
vendored
Normal file
1
assets/js/components/prism-j.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
Prism.languages.j={comment:/\bNB\..*/,string:{pattern:/'(?:''|[^'\r\n])*'/,greedy:!0},keyword:/\b(?:(?:adverb|conjunction|CR|def|define|dyad|LF|monad|noun|verb)\b|(?:assert|break|case|catch[dt]?|continue|do|else|elseif|end|fcase|for|for_\w+|goto_\w+|if|label_\w+|return|select|throw|try|while|whilst)\.)/,verb:{pattern:/(?!\^:|;\.|[=!][.:])(?:\{(?:\.|::?)?|p(?:\.\.?|:)|[=!\]]|[<>+*\-%$|,#][.:]?|[\^?]\.?|[;\[]:?|[~}"i][.:]|[ACeEIjLor]\.|(?:[_\/\\qsux]|_?\d):)/,alias:"keyword"},number:/\b_?(?:(?!\d:)\d+(?:\.\d+)?(?:(?:[ejpx]|ad|ar)_?\d+(?:\.\d+)?)*(?:b_?[\da-z]+(?:\.[\da-z]+)?)?|_(?!\.))/,adverb:{pattern:/[~}]|[\/\\]\.?|[bfM]\.|t[.:]/,alias:"builtin"},operator:/[=a][.:]|_\./,conjunction:{pattern:/&(?:\.:?|:)?|[.:@][.:]?|[!D][.:]|[;dHT]\.|`:?|[\^LS]:|"/,alias:"variable"},punctuation:/[()]/};
|
198
assets/js/components/prism-jade.js
Normal file
198
assets/js/components/prism-jade.js
Normal file
|
@ -0,0 +1,198 @@
|
|||
(function(Prism) {
|
||||
// TODO:
|
||||
// - Add CSS highlighting inside <style> tags
|
||||
// - Add support for multi-line code blocks
|
||||
// - Add support for interpolation #{} and !{}
|
||||
// - Add support for tag interpolation #[]
|
||||
// - Add explicit support for plain text using |
|
||||
// - Add support for markup embedded in plain text
|
||||
|
||||
Prism.languages.jade = {
|
||||
|
||||
// Multiline stuff should appear before the rest
|
||||
|
||||
// This handles both single-line and multi-line comments
|
||||
'comment': {
|
||||
pattern: /(^([\t ]*))\/\/.*((?:\r?\n|\r)\2[\t ]+.+)*/m,
|
||||
lookbehind: true
|
||||
},
|
||||
|
||||
// All the tag-related part is in lookbehind
|
||||
// so that it can be highlighted by the "tag" pattern
|
||||
'multiline-script': {
|
||||
pattern: /(^([\t ]*)script\b.*\.[\t ]*)((?:\r?\n|\r(?!\n))(?:\2[\t ]+.+|\s*?(?=\r?\n|\r)))+/m,
|
||||
lookbehind: true,
|
||||
inside: {
|
||||
rest: Prism.languages.javascript
|
||||
}
|
||||
},
|
||||
|
||||
// See at the end of the file for known filters
|
||||
'filter': {
|
||||
pattern: /(^([\t ]*)):.+((?:\r?\n|\r(?!\n))(?:\2[\t ]+.+|\s*?(?=\r?\n|\r)))+/m,
|
||||
lookbehind: true,
|
||||
inside: {
|
||||
'filter-name': {
|
||||
pattern: /^:[\w-]+/,
|
||||
alias: 'variable'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
'multiline-plain-text': {
|
||||
pattern: /(^([\t ]*)[\w\-#.]+\.[\t ]*)((?:\r?\n|\r(?!\n))(?:\2[\t ]+.+|\s*?(?=\r?\n|\r)))+/m,
|
||||
lookbehind: true
|
||||
},
|
||||
'markup': {
|
||||
pattern: /(^[\t ]*)<.+/m,
|
||||
lookbehind: true,
|
||||
inside: {
|
||||
rest: Prism.languages.markup
|
||||
}
|
||||
},
|
||||
'doctype': {
|
||||
pattern: /((?:^|\n)[\t ]*)doctype(?: .+)?/,
|
||||
lookbehind: true
|
||||
},
|
||||
|
||||
// This handle all conditional and loop keywords
|
||||
'flow-control': {
|
||||
pattern: /(^[\t ]*)(?:if|unless|else|case|when|default|each|while)\b(?: .+)?/m,
|
||||
lookbehind: true,
|
||||
inside: {
|
||||
'each': {
|
||||
pattern: /^each .+? in\b/,
|
||||
inside: {
|
||||
'keyword': /\b(?:each|in)\b/,
|
||||
'punctuation': /,/
|
||||
}
|
||||
},
|
||||
'branch': {
|
||||
pattern: /^(?:if|unless|else|case|when|default|while)\b/,
|
||||
alias: 'keyword'
|
||||
},
|
||||
rest: Prism.languages.javascript
|
||||
}
|
||||
},
|
||||
'keyword': {
|
||||
pattern: /(^[\t ]*)(?:block|extends|include|append|prepend)\b.+/m,
|
||||
lookbehind: true
|
||||
},
|
||||
'mixin': [
|
||||
// Declaration
|
||||
{
|
||||
pattern: /(^[\t ]*)mixin .+/m,
|
||||
lookbehind: true,
|
||||
inside: {
|
||||
'keyword': /^mixin/,
|
||||
'function': /\w+(?=\s*\(|\s*$)/,
|
||||
'punctuation': /[(),.]/
|
||||
}
|
||||
},
|
||||
// Usage
|
||||
{
|
||||
pattern: /(^[\t ]*)\+.+/m,
|
||||
lookbehind: true,
|
||||
inside: {
|
||||
'name': {
|
||||
pattern: /^\+\w+/,
|
||||
alias: 'function'
|
||||
},
|
||||
'rest': Prism.languages.javascript
|
||||
}
|
||||
}
|
||||
],
|
||||
'script': {
|
||||
pattern: /(^[\t ]*script(?:(?:&[^(]+)?\([^)]+\))*[\t ]+).+/m,
|
||||
lookbehind: true,
|
||||
inside: {
|
||||
rest: Prism.languages.javascript
|
||||
}
|
||||
},
|
||||
|
||||
'plain-text': {
|
||||
pattern: /(^[\t ]*(?!-)[\w\-#.]*[\w\-](?:(?:&[^(]+)?\([^)]+\))*\/?[\t ]+).+/m,
|
||||
lookbehind: true
|
||||
},
|
||||
'tag': {
|
||||
pattern: /(^[\t ]*)(?!-)[\w\-#.]*[\w\-](?:(?:&[^(]+)?\([^)]+\))*\/?:?/m,
|
||||
lookbehind: true,
|
||||
inside: {
|
||||
'attributes': [
|
||||
{
|
||||
pattern: /&[^(]+\([^)]+\)/,
|
||||
inside: {
|
||||
rest: Prism.languages.javascript
|
||||
}
|
||||
},
|
||||
{
|
||||
pattern: /\([^)]+\)/,
|
||||
inside: {
|
||||
'attr-value': {
|
||||
pattern: /(=\s*)(?:\{[^}]*\}|[^,)\r\n]+)/,
|
||||
lookbehind: true,
|
||||
inside: {
|
||||
rest: Prism.languages.javascript
|
||||
}
|
||||
},
|
||||
'attr-name': /[\w-]+(?=\s*!?=|\s*[,)])/,
|
||||
'punctuation': /[!=(),]+/
|
||||
}
|
||||
}
|
||||
],
|
||||
'punctuation': /:/
|
||||
}
|
||||
},
|
||||
'code': [
|
||||
{
|
||||
pattern: /(^[\t ]*(?:-|!?=)).+/m,
|
||||
lookbehind: true,
|
||||
inside: {
|
||||
rest: Prism.languages.javascript
|
||||
}
|
||||
}
|
||||
],
|
||||
'punctuation': /[.\-!=|]+/
|
||||
};
|
||||
|
||||
var filter_pattern = '(^([\\t ]*)):{{filter_name}}((?:\\r?\\n|\\r(?!\\n))(?:\\2[\\t ]+.+|\\s*?(?=\\r?\\n|\\r)))+';
|
||||
|
||||
// Non exhaustive list of available filters and associated languages
|
||||
var filters = [
|
||||
{filter:'atpl',language:'twig'},
|
||||
{filter:'coffee',language:'coffeescript'},
|
||||
'ejs',
|
||||
'handlebars',
|
||||
'hogan',
|
||||
'less',
|
||||
'livescript',
|
||||
'markdown',
|
||||
'mustache',
|
||||
'plates',
|
||||
{filter:'sass',language:'scss'},
|
||||
'stylus',
|
||||
'swig'
|
||||
|
||||
];
|
||||
var all_filters = {};
|
||||
for (var i = 0, l = filters.length; i < l; i++) {
|
||||
var filter = filters[i];
|
||||
filter = typeof filter === 'string' ? {filter: filter, language: filter} : filter;
|
||||
if (Prism.languages[filter.language]) {
|
||||
all_filters['filter-' + filter.filter] = {
|
||||
pattern: RegExp(filter_pattern.replace('{{filter_name}}', filter.filter), 'm'),
|
||||
lookbehind: true,
|
||||
inside: {
|
||||
'filter-name': {
|
||||
pattern: /^:[\w-]+/,
|
||||
alias: 'variable'
|
||||
},
|
||||
rest: Prism.languages[filter.language]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Prism.languages.insertBefore('jade', 'filter', all_filters);
|
||||
|
||||
}(Prism));
|
1
assets/js/components/prism-jade.min.js
vendored
Normal file
1
assets/js/components/prism-jade.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
!function(e){e.languages.jade={comment:{pattern:/(^([\t ]*))\/\/.*((?:\r?\n|\r)\2[\t ]+.+)*/m,lookbehind:!0},"multiline-script":{pattern:/(^([\t ]*)script\b.*\.[\t ]*)((?:\r?\n|\r(?!\n))(?:\2[\t ]+.+|\s*?(?=\r?\n|\r)))+/m,lookbehind:!0,inside:{rest:e.languages.javascript}},filter:{pattern:/(^([\t ]*)):.+((?:\r?\n|\r(?!\n))(?:\2[\t ]+.+|\s*?(?=\r?\n|\r)))+/m,lookbehind:!0,inside:{"filter-name":{pattern:/^:[\w-]+/,alias:"variable"}}},"multiline-plain-text":{pattern:/(^([\t ]*)[\w\-#.]+\.[\t ]*)((?:\r?\n|\r(?!\n))(?:\2[\t ]+.+|\s*?(?=\r?\n|\r)))+/m,lookbehind:!0},markup:{pattern:/(^[\t ]*)<.+/m,lookbehind:!0,inside:{rest:e.languages.markup}},doctype:{pattern:/((?:^|\n)[\t ]*)doctype(?: .+)?/,lookbehind:!0},"flow-control":{pattern:/(^[\t ]*)(?:if|unless|else|case|when|default|each|while)\b(?: .+)?/m,lookbehind:!0,inside:{each:{pattern:/^each .+? in\b/,inside:{keyword:/\b(?:each|in)\b/,punctuation:/,/}},branch:{pattern:/^(?:if|unless|else|case|when|default|while)\b/,alias:"keyword"},rest:e.languages.javascript}},keyword:{pattern:/(^[\t ]*)(?:block|extends|include|append|prepend)\b.+/m,lookbehind:!0},mixin:[{pattern:/(^[\t ]*)mixin .+/m,lookbehind:!0,inside:{keyword:/^mixin/,"function":/\w+(?=\s*\(|\s*$)/,punctuation:/[(),.]/}},{pattern:/(^[\t ]*)\+.+/m,lookbehind:!0,inside:{name:{pattern:/^\+\w+/,alias:"function"},rest:e.languages.javascript}}],script:{pattern:/(^[\t ]*script(?:(?:&[^(]+)?\([^)]+\))*[\t ]+).+/m,lookbehind:!0,inside:{rest:e.languages.javascript}},"plain-text":{pattern:/(^[\t ]*(?!-)[\w\-#.]*[\w\-](?:(?:&[^(]+)?\([^)]+\))*\/?[\t ]+).+/m,lookbehind:!0},tag:{pattern:/(^[\t ]*)(?!-)[\w\-#.]*[\w\-](?:(?:&[^(]+)?\([^)]+\))*\/?:?/m,lookbehind:!0,inside:{attributes:[{pattern:/&[^(]+\([^)]+\)/,inside:{rest:e.languages.javascript}},{pattern:/\([^)]+\)/,inside:{"attr-value":{pattern:/(=\s*)(?:\{[^}]*\}|[^,)\r\n]+)/,lookbehind:!0,inside:{rest:e.languages.javascript}},"attr-name":/[\w-]+(?=\s*!?=|\s*[,)])/,punctuation:/[!=(),]+/}}],punctuation:/:/}},code:[{pattern:/(^[\t ]*(?:-|!?=)).+/m,lookbehind:!0,inside:{rest:e.languages.javascript}}],punctuation:/[.\-!=|]+/};for(var t="(^([\\t ]*)):{{filter_name}}((?:\\r?\\n|\\r(?!\\n))(?:\\2[\\t ]+.+|\\s*?(?=\\r?\\n|\\r)))+",n=[{filter:"atpl",language:"twig"},{filter:"coffee",language:"coffeescript"},"ejs","handlebars","hogan","less","livescript","markdown","mustache","plates",{filter:"sass",language:"scss"},"stylus","swig"],a={},i=0,r=n.length;r>i;i++){var s=n[i];s="string"==typeof s?{filter:s,language:s}:s,e.languages[s.language]&&(a["filter-"+s.filter]={pattern:RegExp(t.replace("{{filter_name}}",s.filter),"m"),lookbehind:!0,inside:{"filter-name":{pattern:/^:[\w-]+/,alias:"variable"},rest:e.languages[s.language]}})}e.languages.insertBefore("jade","filter",a)}(Prism);
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue