summaryrefslogtreecommitdiffstats
path: root/public/prism/prism-mermaid.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-mermaid.min.js
parentab355897a12b7bda1089a44de326d41455a0f7a3 (diff)
chore: add prismjs for syntax highlighting
Diffstat (limited to 'public/prism/prism-mermaid.min.js')
-rw-r--r--public/prism/prism-mermaid.min.js86
1 files changed, 86 insertions, 0 deletions
diff --git a/public/prism/prism-mermaid.min.js b/public/prism/prism-mermaid.min.js
new file mode 100644
index 0000000..75c357f
--- /dev/null
+++ b/public/prism/prism-mermaid.min.js
@@ -0,0 +1,86 @@
+Prism.languages.mermaid = {
+ comment: { pattern: /%%.*/, greedy: !0 },
+ style: {
+ pattern:
+ /^([ \t]*(?:classDef|linkStyle|style)[ \t]+[\w$-]+[ \t]+)\w.*[^\s;]/m,
+ lookbehind: !0,
+ inside: {
+ property: /\b\w[\w-]*(?=[ \t]*:)/,
+ operator: /:/,
+ punctuation: /,/,
+ },
+ },
+ 'inter-arrow-label': {
+ pattern:
+ /([^<>ox.=-])(?:-[-.]|==)(?![<>ox.=-])[ \t]*(?:"[^"\r\n]*"|[^\s".=-](?:[^\r\n.=-]*[^\s.=-])?)[ \t]*(?:\.+->?|--+[->]|==+[=>])(?![<>ox.=-])/,
+ lookbehind: !0,
+ greedy: !0,
+ inside: {
+ arrow: { pattern: /(?:\.+->?|--+[->]|==+[=>])$/, alias: 'operator' },
+ label: {
+ pattern: /^([\s\S]{2}[ \t]*)\S(?:[\s\S]*\S)?/,
+ lookbehind: !0,
+ alias: 'property',
+ },
+ 'arrow-head': { pattern: /^\S+/, alias: ['arrow', 'operator'] },
+ },
+ },
+ arrow: [
+ {
+ pattern: /(^|[^{}|o.-])[|}][|o](?:--|\.\.)[|o][|{](?![{}|o.-])/,
+ lookbehind: !0,
+ alias: 'operator',
+ },
+ {
+ pattern:
+ /(^|[^<>ox.=-])(?:[<ox](?:==+|--+|-\.*-)[>ox]?|(?:==+|--+|-\.*-)[>ox]|===+|---+|-\.+-)(?![<>ox.=-])/,
+ lookbehind: !0,
+ alias: 'operator',
+ },
+ {
+ pattern:
+ /(^|[^<>()x-])(?:--?(?:>>|[x>)])(?![<>()x])|(?:<<|[x<(])--?(?!-))/,
+ lookbehind: !0,
+ alias: 'operator',
+ },
+ {
+ pattern:
+ /(^|[^<>|*o.-])(?:[*o]--|--[*o]|<\|?(?:--|\.\.)|(?:--|\.\.)\|?>|--|\.\.)(?![<>|*o.-])/,
+ lookbehind: !0,
+ alias: 'operator',
+ },
+ ],
+ label: {
+ pattern: /(^|[^|<])\|(?:[^\r\n"|]|"[^"\r\n]*")+\|/,
+ lookbehind: !0,
+ greedy: !0,
+ alias: 'property',
+ },
+ text: {
+ pattern: /(?:[(\[{]+|\b>)(?:[^\r\n"()\[\]{}]|"[^"\r\n]*")+(?:[)\]}]+|>)/,
+ alias: 'string',
+ },
+ string: { pattern: /"[^"\r\n]*"/, greedy: !0 },
+ annotation: {
+ pattern:
+ /<<(?:abstract|choice|enumeration|fork|interface|join|service)>>|\[\[(?:choice|fork|join)\]\]/i,
+ alias: 'important',
+ },
+ keyword: [
+ {
+ pattern:
+ /(^[ \t]*)(?:action|callback|class|classDef|classDiagram|click|direction|erDiagram|flowchart|gantt|gitGraph|graph|journey|link|linkStyle|pie|requirementDiagram|sequenceDiagram|stateDiagram|stateDiagram-v2|style|subgraph)(?![\w$-])/m,
+ lookbehind: !0,
+ greedy: !0,
+ },
+ {
+ pattern:
+ /(^[ \t]*)(?:activate|alt|and|as|autonumber|deactivate|else|end(?:[ \t]+note)?|loop|opt|par|participant|rect|state|note[ \t]+(?:over|(?:left|right)[ \t]+of))(?![\w$-])/im,
+ lookbehind: !0,
+ greedy: !0,
+ },
+ ],
+ entity: /#[a-z0-9]+;/,
+ operator: { pattern: /(\w[ \t]*)&(?=[ \t]*\w)|:::|:/, lookbehind: !0 },
+ punctuation: /[(){};]/,
+};