diff options
| author | Armand Philippot <git@armandphilippot.com> | 2021-12-30 19:47:21 +0100 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2021-12-30 19:47:21 +0100 |
| commit | a98b5ea6fe8e8cc98a55e0fd793e6e8660ea31c1 (patch) | |
| tree | 542810ab5aef99150db228bb54fd58303dcb31c7 /public/prism/prism-perl.min.js | |
| parent | ab355897a12b7bda1089a44de326d41455a0f7a3 (diff) | |
chore: add prismjs for syntax highlighting
Diffstat (limited to 'public/prism/prism-perl.min.js')
| -rw-r--r-- | public/prism/prism-perl.min.js | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/public/prism/prism-perl.min.js b/public/prism/prism-perl.min.js new file mode 100644 index 0000000..3bb0d61 --- /dev/null +++ b/public/prism/prism-perl.min.js @@ -0,0 +1,76 @@ +!(function (e) { + var n = + '(?:\\((?:[^()\\\\]|\\\\[^])*\\)|\\{(?:[^{}\\\\]|\\\\[^])*\\}|\\[(?:[^[\\]\\\\]|\\\\[^])*\\]|<(?:[^<>\\\\]|\\\\[^])*>)'; + Prism.languages.perl = { + comment: [ + { pattern: /(^\s*)=\w[\s\S]*?=cut.*/m, lookbehind: !0, greedy: !0 }, + { pattern: /(^|[^\\$])#.*/, lookbehind: !0, greedy: !0 }, + ], + string: [ + { + pattern: RegExp( + '\\b(?:q|qq|qw|qx)(?![a-zA-Z0-9])\\s*(?:' + + [ + '([^a-zA-Z0-9\\s{(\\[<])(?:(?!\\1)[^\\\\]|\\\\[^])*\\1', + '([a-zA-Z0-9])(?:(?!\\2)[^\\\\]|\\\\[^])*\\2', + n, + ].join('|') + + ')' + ), + greedy: !0, + }, + { pattern: /("|`)(?:(?!\1)[^\\]|\\[\s\S])*\1/, greedy: !0 }, + { pattern: /'(?:[^'\\\r\n]|\\.)*'/, greedy: !0 }, + ], + regex: [ + { + pattern: RegExp( + '\\b(?:m|qr)(?![a-zA-Z0-9])\\s*(?:' + + [ + '([^a-zA-Z0-9\\s{(\\[<])(?:(?!\\1)[^\\\\]|\\\\[^])*\\1', + '([a-zA-Z0-9])(?:(?!\\2)[^\\\\]|\\\\[^])*\\2', + n, + ].join('|') + + ')[msixpodualngc]*' + ), + greedy: !0, + }, + { + pattern: RegExp( + '(^|[^-])\\b(?:s|tr|y)(?![a-zA-Z0-9])\\s*(?:' + + [ + '([^a-zA-Z0-9\\s{(\\[<])(?:(?!\\2)[^\\\\]|\\\\[^])*\\2(?:(?!\\2)[^\\\\]|\\\\[^])*\\2', + '([a-zA-Z0-9])(?:(?!\\3)[^\\\\]|\\\\[^])*\\3(?:(?!\\3)[^\\\\]|\\\\[^])*\\3', + n + '\\s*' + n, + ].join('|') + + ')[msixpodualngcer]*' + ), + lookbehind: !0, + greedy: !0, + }, + { + pattern: + /\/(?:[^\/\\\r\n]|\\.)*\/[msixpodualngc]*(?=\s*(?:$|[\r\n,.;})&|\-+*~<>!?^]|(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|x|xor)\b))/, + greedy: !0, + }, + ], + variable: [ + /[&*$@%]\{\^[A-Z]+\}/, + /[&*$@%]\^[A-Z_]/, + /[&*$@%]#?(?=\{)/, + /[&*$@%]#?(?:(?:::)*'?(?!\d)[\w$]+(?![\w$]))+(?:::)*/, + /[&*$@%]\d+/, + /(?!%=)[$@%][!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~]/, + ], + filehandle: { pattern: /<(?![<=])\S*?>|\b_\b/, alias: 'symbol' }, + 'v-string': { pattern: /v\d+(?:\.\d+)*|\d+(?:\.\d+){2,}/, alias: 'string' }, + function: { pattern: /(\bsub[ \t]+)\w+/, lookbehind: !0 }, + keyword: + /\b(?:any|break|continue|default|delete|die|do|else|elsif|eval|for|foreach|given|goto|if|last|local|my|next|our|package|print|redo|require|return|say|state|sub|switch|undef|unless|until|use|when|while)\b/, + number: + /\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)\b/, + operator: + /-[rwxoRWXOezsfdlpSbctugkTBMAC]\b|\+[+=]?|-[-=>]?|\*\*?=?|\/\/?=?|=[=~>]?|~[~=]?|\|\|?=?|&&?=?|<(?:=>?|<=?)?|>>?=?|![~=]?|[%^]=?|\.(?:=|\.\.?)?|[\\?]|\bx(?:=|\b)|\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)\b/, + punctuation: /[{}[\];(),:]/, + }; +})(); |
