summaryrefslogtreecommitdiffstats
path: root/public/prism/prism-yaml.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-yaml.min.js
parentab355897a12b7bda1089a44de326d41455a0f7a3 (diff)
chore: add prismjs for syntax highlighting
Diffstat (limited to 'public/prism/prism-yaml.min.js')
-rw-r--r--public/prism/prism-yaml.min.js90
1 files changed, 90 insertions, 0 deletions
diff --git a/public/prism/prism-yaml.min.js b/public/prism/prism-yaml.min.js
new file mode 100644
index 0000000..769460f
--- /dev/null
+++ b/public/prism/prism-yaml.min.js
@@ -0,0 +1,90 @@
+!(function (e) {
+ var n = /[*&][^\s[\]{},]+/,
+ r =
+ /!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,
+ t =
+ '(?:' +
+ r.source +
+ '(?:[ \t]+' +
+ n.source +
+ ')?|' +
+ n.source +
+ '(?:[ \t]+' +
+ r.source +
+ ')?)',
+ a =
+ '(?:[^\\s\\x00-\\x08\\x0e-\\x1f!"#%&\'*,\\-:>?@[\\]`{|}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*'.replace(
+ /<PLAIN>/g,
+ function () {
+ return '[^\\s\\x00-\\x08\\x0e-\\x1f,[\\]{}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]';
+ }
+ ),
+ d = '"(?:[^"\\\\\r\n]|\\\\.)*"|\'(?:[^\'\\\\\r\n]|\\\\.)*\'';
+ function o(e, n) {
+ n = (n || '').replace(/m/g, '') + 'm';
+ var r =
+ '([:\\-,[{]\\s*(?:\\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\\]|\\}|(?:[\r\n]\\s*)?#))'
+ .replace(/<<prop>>/g, function () {
+ return t;
+ })
+ .replace(/<<value>>/g, function () {
+ return e;
+ });
+ return RegExp(r, n);
+ }
+ (e.languages.yaml = {
+ scalar: {
+ pattern: RegExp(
+ '([\\-:]\\s*(?:\\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\\S[^\r\n]*(?:\\2[^\r\n]+)*)'.replace(
+ /<<prop>>/g,
+ function () {
+ return t;
+ }
+ )
+ ),
+ lookbehind: !0,
+ alias: 'string',
+ },
+ comment: /#.*/,
+ key: {
+ pattern: RegExp(
+ '((?:^|[:\\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\\s*:\\s)'
+ .replace(/<<prop>>/g, function () {
+ return t;
+ })
+ .replace(/<<key>>/g, function () {
+ return '(?:' + a + '|' + d + ')';
+ })
+ ),
+ lookbehind: !0,
+ greedy: !0,
+ alias: 'atrule',
+ },
+ directive: { pattern: /(^[ \t]*)%.+/m, lookbehind: !0, alias: 'important' },
+ datetime: {
+ pattern: o(
+ '\\d{4}-\\d\\d?-\\d\\d?(?:[tT]|[ \t]+)\\d\\d?:\\d{2}:\\d{2}(?:\\.\\d*)?(?:[ \t]*(?:Z|[-+]\\d\\d?(?::\\d{2})?))?|\\d{4}-\\d{2}-\\d{2}|\\d\\d?:\\d{2}(?::\\d{2}(?:\\.\\d*)?)?'
+ ),
+ lookbehind: !0,
+ alias: 'number',
+ },
+ boolean: {
+ pattern: o('false|true', 'i'),
+ lookbehind: !0,
+ alias: 'important',
+ },
+ null: { pattern: o('null|~', 'i'), lookbehind: !0, alias: 'important' },
+ string: { pattern: o(d), lookbehind: !0, greedy: !0 },
+ number: {
+ pattern: o(
+ '[+-]?(?:0x[\\da-f]+|0o[0-7]+|(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?|\\.inf|\\.nan)',
+ 'i'
+ ),
+ lookbehind: !0,
+ },
+ tag: r,
+ important: n,
+ punctuation: /---|[:[\]{}\-,|>?]|\.\.\./,
+ }),
+ (e.languages.yml = e.languages.yaml);
+})(Prism);