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-powerquery.min.js | |
| parent | ab355897a12b7bda1089a44de326d41455a0f7a3 (diff) | |
chore: add prismjs for syntax highlighting
Diffstat (limited to 'public/prism/prism-powerquery.min.js')
| -rw-r--r-- | public/prism/prism-powerquery.min.js | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/public/prism/prism-powerquery.min.js b/public/prism/prism-powerquery.min.js new file mode 100644 index 0000000..e838202 --- /dev/null +++ b/public/prism/prism-powerquery.min.js @@ -0,0 +1,46 @@ +(Prism.languages.powerquery = { + comment: { + pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/, + lookbehind: !0, + greedy: !0, + }, + 'quoted-identifier': { pattern: /#"(?:[^"\r\n]|"")*"(?!")/, greedy: !0 }, + string: { pattern: /(?:#!)?"(?:[^"\r\n]|"")*"(?!")/, greedy: !0 }, + constant: [ + /\bDay\.(?:Friday|Monday|Saturday|Sunday|Thursday|Tuesday|Wednesday)\b/, + /\bTraceLevel\.(?:Critical|Error|Information|Verbose|Warning)\b/, + /\bOccurrence\.(?:All|First|Last)\b/, + /\bOrder\.(?:Ascending|Descending)\b/, + /\bRoundingMode\.(?:AwayFromZero|Down|ToEven|TowardZero|Up)\b/, + /\bMissingField\.(?:Error|Ignore|UseNull)\b/, + /\bQuoteStyle\.(?:Csv|None)\b/, + /\bJoinKind\.(?:FullOuter|Inner|LeftAnti|LeftOuter|RightAnti|RightOuter)\b/, + /\bGroupKind\.(?:Global|Local)\b/, + /\bExtraValues\.(?:Error|Ignore|List)\b/, + /\bJoinAlgorithm\.(?:Dynamic|LeftHash|LeftIndex|PairwiseHash|RightHash|RightIndex|SortMerge)\b/, + /\bJoinSide\.(?:Left|Right)\b/, + /\bPrecision\.(?:Decimal|Double)\b/, + /\bRelativePosition\.From(?:End|Start)\b/, + /\bTextEncoding\.(?:Ascii|BigEndianUnicode|Unicode|Utf16|Utf8|Windows)\b/, + /\b(?:Any|Binary|Date|DateTime|DateTimeZone|Duration|Function|Int16|Int32|Int64|Int8|List|Logical|None|Number|Record|Table|Text|Time)\.Type\b/, + /\bnull\b/, + ], + boolean: /\b(?:false|true)\b/, + keyword: + /\b(?:and|as|each|else|error|if|in|is|let|meta|not|nullable|optional|or|otherwise|section|shared|then|try|type)\b|#(?:binary|date|datetime|datetimezone|duration|infinity|nan|sections|shared|table|time)\b/, + function: { pattern: /(^|[^#\w.])[a-z_][\w.]*(?=\s*\()/i, lookbehind: !0 }, + 'data-type': { + pattern: + /\b(?:any|anynonnull|binary|date|datetime|datetimezone|duration|function|list|logical|none|number|record|table|text|time)\b/, + alias: 'class-name', + }, + number: { + pattern: + /\b0x[\da-f]+\b|(?:[+-]?(?:\b\d+\.)?\b\d+|[+-]\.\d+|(^|[^.])\B\.\d+)(?:e[+-]?\d+)?\b/i, + lookbehind: !0, + }, + operator: /[-+*\/&?@^]|<(?:=>?|>)?|>=?|=>?|\.\.\.?/, + punctuation: /[,;\[\](){}]/, +}), + (Prism.languages.pq = Prism.languages.powerquery), + (Prism.languages.mscript = Prism.languages.powerquery); |
