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-typoscript.min.js | |
| parent | ab355897a12b7bda1089a44de326d41455a0f7a3 (diff) | |
chore: add prismjs for syntax highlighting
Diffstat (limited to 'public/prism/prism-typoscript.min.js')
| -rw-r--r-- | public/prism/prism-typoscript.min.js | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/public/prism/prism-typoscript.min.js b/public/prism/prism-typoscript.min.js new file mode 100644 index 0000000..2873c43 --- /dev/null +++ b/public/prism/prism-typoscript.min.js @@ -0,0 +1,48 @@ +!(function (E) { + var n = + /\b(?:ACT|ACTIFSUB|CARRAY|CASE|CLEARGIF|COA|COA_INT|CONSTANTS|CONTENT|CUR|EDITPANEL|EFFECT|EXT|FILE|FLUIDTEMPLATE|FORM|FRAME|FRAMESET|GIFBUILDER|GMENU|GMENU_FOLDOUT|GMENU_LAYERS|GP|HMENU|HRULER|HTML|IENV|IFSUB|IMAGE|IMGMENU|IMGMENUITEM|IMGTEXT|IMG_RESOURCE|INCLUDE_TYPOSCRIPT|JSMENU|JSMENUITEM|LLL|LOAD_REGISTER|NO|PAGE|RECORDS|RESTORE_REGISTER|TEMPLATE|TEXT|TMENU|TMENUITEM|TMENU_LAYERS|USER|USER_INT|_GIFBUILDER|global|globalString|globalVar)\b/; + (E.languages.typoscript = { + comment: [ + { pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/, lookbehind: !0 }, + { + pattern: /(^|[^\\:= \t]|(?:^|[^= \t])[ \t]+)\/\/.*/, + lookbehind: !0, + greedy: !0, + }, + { pattern: /(^|[^"'])#.*/, lookbehind: !0, greedy: !0 }, + ], + function: [ + { + pattern: + /<INCLUDE_TYPOSCRIPT:\s*source\s*=\s*(?:"[^"\r\n]*"|'[^'\r\n]*')\s*>/, + inside: { + string: { + pattern: /"[^"\r\n]*"|'[^'\r\n]*'/, + inside: { keyword: n }, + }, + keyword: { pattern: /INCLUDE_TYPOSCRIPT/ }, + }, + }, + { + pattern: /@import\s*(?:"[^"\r\n]*"|'[^'\r\n]*')/, + inside: { string: /"[^"\r\n]*"|'[^'\r\n]*'/ }, + }, + ], + string: { + pattern: /^([^=]*=[< ]?)(?:(?!\]\n).)*/, + lookbehind: !0, + inside: { + function: /\{\$.*\}/, + keyword: n, + number: /^\d+$/, + punctuation: /[,|:]/, + }, + }, + keyword: n, + number: { pattern: /\b\d+\s*[.{=]/, inside: { operator: /[.{=]/ } }, + tag: { pattern: /\.?[-\w\\]+\.?/, inside: { punctuation: /\./ } }, + punctuation: /[{}[\];(),.:|]/, + operator: /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/, + }), + (E.languages.tsconfig = E.languages.typoscript); +})(Prism); |
