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-elm.min.js | |
| parent | ab355897a12b7bda1089a44de326d41455a0f7a3 (diff) | |
chore: add prismjs for syntax highlighting
Diffstat (limited to 'public/prism/prism-elm.min.js')
| -rw-r--r-- | public/prism/prism-elm.min.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/public/prism/prism-elm.min.js b/public/prism/prism-elm.min.js new file mode 100644 index 0000000..2fdcae9 --- /dev/null +++ b/public/prism/prism-elm.min.js @@ -0,0 +1,27 @@ +Prism.languages.elm = { + comment: /--.*|\{-[\s\S]*?-\}/, + char: { + pattern: + /'(?:[^\\'\r\n]|\\(?:[abfnrtv\\']|\d+|x[0-9a-fA-F]+|u\{[0-9a-fA-F]+\}))'/, + greedy: !0, + }, + string: [ + { pattern: /"""[\s\S]*?"""/, greedy: !0 }, + { pattern: /"(?:[^\\"\r\n]|\\.)*"/, greedy: !0 }, + ], + 'import-statement': { + pattern: + /(^[\t ]*)import\s+[A-Z]\w*(?:\.[A-Z]\w*)*(?:\s+as\s+(?:[A-Z]\w*)(?:\.[A-Z]\w*)*)?(?:\s+exposing\s+)?/m, + lookbehind: !0, + inside: { keyword: /\b(?:as|exposing|import)\b/ }, + }, + keyword: + /\b(?:alias|as|case|else|exposing|if|in|infixl|infixr|let|module|of|then|type)\b/, + builtin: + /\b(?:abs|acos|always|asin|atan|atan2|ceiling|clamp|compare|cos|curry|degrees|e|flip|floor|fromPolar|identity|isInfinite|isNaN|logBase|max|min|negate|never|not|pi|radians|rem|round|sin|sqrt|tan|toFloat|toPolar|toString|truncate|turns|uncurry|xor)\b/, + number: /\b(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?|0x[0-9a-f]+)\b/i, + operator: /\s\.\s|[+\-/*=.$<>:&|^?%#@~!]{2,}|[+\-/*=$<>:&|^?%#@~!]/, + hvariable: /\b(?:[A-Z]\w*\.)*[a-z]\w*\b/, + constant: /\b(?:[A-Z]\w*\.)*[A-Z]\w*\b/, + punctuation: /[{}[\]|(),.:]/, +}; |
