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-magma.min.js | |
| parent | ab355897a12b7bda1089a44de326d41455a0f7a3 (diff) | |
chore: add prismjs for syntax highlighting
Diffstat (limited to 'public/prism/prism-magma.min.js')
| -rw-r--r-- | public/prism/prism-magma.min.js | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/public/prism/prism-magma.min.js b/public/prism/prism-magma.min.js new file mode 100644 index 0000000..39c0d27 --- /dev/null +++ b/public/prism/prism-magma.min.js @@ -0,0 +1,26 @@ +Prism.languages.magma = { + output: { + pattern: + /^(>.*(?:\r(?:\n|(?!\n))|\n))(?!>)(?:.+|(?:\r(?:\n|(?!\n))|\n)(?!>).*)(?:(?:\r(?:\n|(?!\n))|\n)(?!>).*)*/m, + lookbehind: !0, + greedy: !0, + }, + comment: { pattern: /\/\/.*|\/\*[\s\S]*?\*\//, greedy: !0 }, + string: { + pattern: /(^|[^\\"])"(?:[^\r\n\\"]|\\.)*"/, + lookbehind: !0, + greedy: !0, + }, + keyword: + /\b(?:_|adj|and|assert|assert2|assert3|assigned|break|by|case|cat|catch|clear|cmpeq|cmpne|continue|declare|default|delete|diff|div|do|elif|else|end|eq|error|eval|exists|exit|for|forall|forward|fprintf|freeze|function|ge|gt|if|iload|import|in|intrinsic|is|join|le|load|local|lt|meet|mod|ne|not|notadj|notin|notsubset|or|print|printf|procedure|quit|random|read|readi|repeat|require|requirege|requirerange|restore|return|save|sdiff|select|subset|then|time|to|try|until|vprint|vprintf|vtime|when|where|while|xor)\b/, + boolean: /\b(?:false|true)\b/, + generator: { pattern: /\b[a-z_]\w*(?=\s*<)/i, alias: 'class-name' }, + function: /\b[a-z_]\w*(?=\s*\()/i, + number: { + pattern: + /(^|[^\w.]|\.\.)(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?(?:_[a-z]?)?(?=$|[^\w.]|\.\.)/, + lookbehind: !0, + }, + operator: /->|[-+*/^~!|#=]|:=|\.\./, + punctuation: /[()[\]{}<>,;.:]/, +}; |
