summaryrefslogtreecommitdiffstats
path: root/public/prism/prism-dhall.min.js
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2021-12-30 19:47:21 +0100
committerArmand Philippot <git@armandphilippot.com>2021-12-30 19:47:21 +0100
commita98b5ea6fe8e8cc98a55e0fd793e6e8660ea31c1 (patch)
tree542810ab5aef99150db228bb54fd58303dcb31c7 /public/prism/prism-dhall.min.js
parentab355897a12b7bda1089a44de326d41455a0f7a3 (diff)
chore: add prismjs for syntax highlighting
Diffstat (limited to 'public/prism/prism-dhall.min.js')
-rw-r--r--public/prism/prism-dhall.min.js49
1 files changed, 49 insertions, 0 deletions
diff --git a/public/prism/prism-dhall.min.js b/public/prism/prism-dhall.min.js
new file mode 100644
index 0000000..65dd3df
--- /dev/null
+++ b/public/prism/prism-dhall.min.js
@@ -0,0 +1,49 @@
+(Prism.languages.dhall = {
+ comment:
+ /--.*|\{-(?:[^-{]|-(?!\})|\{(?!-)|\{-(?:[^-{]|-(?!\})|\{(?!-))*-\})*-\}/,
+ string: {
+ pattern: /"(?:[^"\\]|\\.)*"|''(?:[^']|'(?!')|'''|''\$\{)*''(?!'|\$)/,
+ greedy: !0,
+ inside: {
+ interpolation: {
+ pattern: /\$\{[^{}]*\}/,
+ inside: {
+ expression: {
+ pattern: /(^\$\{)[\s\S]+(?=\}$)/,
+ lookbehind: !0,
+ alias: 'language-dhall',
+ inside: null,
+ },
+ punctuation: /\$\{|\}/,
+ },
+ },
+ },
+ },
+ label: { pattern: /`[^`]*`/, greedy: !0 },
+ url: {
+ pattern:
+ /\bhttps?:\/\/[\w.:%!$&'*+;=@~-]+(?:\/[\w.:%!$&'*+;=@~-]*)*(?:\?[/?\w.:%!$&'*+;=@~-]*)?/,
+ greedy: !0,
+ },
+ env: {
+ pattern: /\benv:(?:(?!\d)\w+|"(?:[^"\\=]|\\.)*")/,
+ greedy: !0,
+ inside: { function: /^env/, operator: /^:/, variable: /[\s\S]+/ },
+ },
+ hash: {
+ pattern: /\bsha256:[\da-fA-F]{64}\b/,
+ inside: { function: /sha256/, operator: /:/, number: /[\da-fA-F]{64}/ },
+ },
+ keyword:
+ /\b(?:as|assert|else|forall|if|in|let|merge|missing|then|toMap|using|with)\b|\u2200/,
+ builtin: /\b(?:None|Some)\b/,
+ boolean: /\b(?:False|True)\b/,
+ number:
+ /\bNaN\b|-?\bInfinity\b|[+-]?\b(?:0x[\da-fA-F]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/,
+ operator:
+ /\/\\|\/\/\\\\|&&|\|\||===|[!=]=|\/\/|->|\+\+|::|[+*#@=:?<>|\\\u2227\u2a53\u2261\u2afd\u03bb\u2192]/,
+ punctuation: /\.\.|[{}\[\](),./]/,
+ 'class-name': /\b[A-Z]\w*\b/,
+}),
+ (Prism.languages.dhall.string.inside.interpolation.inside.expression.inside =
+ Prism.languages.dhall);