summaryrefslogtreecommitdiffstats
path: root/public/prism/prism-stylus.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-stylus.min.js
parentab355897a12b7bda1089a44de326d41455a0f7a3 (diff)
chore: add prismjs for syntax highlighting
Diffstat (limited to 'public/prism/prism-stylus.min.js')
-rw-r--r--public/prism/prism-stylus.min.js104
1 files changed, 104 insertions, 0 deletions
diff --git a/public/prism/prism-stylus.min.js b/public/prism/prism-stylus.min.js
new file mode 100644
index 0000000..9fd6530
--- /dev/null
+++ b/public/prism/prism-stylus.min.js
@@ -0,0 +1,104 @@
+!(function (e) {
+ var n = { pattern: /(\b\d+)(?:%|[a-z]+)/, lookbehind: !0 },
+ r = { pattern: /(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/, lookbehind: !0 },
+ t = {
+ comment: {
+ pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,
+ lookbehind: !0,
+ },
+ url: { pattern: /\burl\((["']?).*?\1\)/i, greedy: !0 },
+ string: {
+ pattern: /("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/,
+ greedy: !0,
+ },
+ interpolation: null,
+ func: null,
+ important: /\B!(?:important|optional)\b/i,
+ keyword: {
+ pattern: /(^|\s+)(?:(?:else|for|if|return|unless)(?=\s|$)|@[\w-]+)/,
+ lookbehind: !0,
+ },
+ hexcode: /#[\da-f]{3,6}/i,
+ color: [
+ /\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,
+ {
+ pattern:
+ /\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,
+ inside: {
+ unit: n,
+ number: r,
+ function: /[\w-]+(?=\()/,
+ punctuation: /[(),]/,
+ },
+ },
+ ],
+ entity: /\\[\da-f]{1,8}/i,
+ unit: n,
+ boolean: /\b(?:false|true)\b/,
+ operator: [
+ /~|[+!\/%<>?=]=?|[-:]=|\*[*=]?|\.{2,3}|&&|\|\||\B-\B|\b(?:and|in|is(?: a| defined| not|nt)?|not|or)\b/,
+ ],
+ number: r,
+ punctuation: /[{}()\[\];:,]/,
+ };
+ (t.interpolation = {
+ pattern: /\{[^\r\n}:]+\}/,
+ alias: 'variable',
+ inside: {
+ delimiter: { pattern: /^\{|\}$/, alias: 'punctuation' },
+ rest: t,
+ },
+ }),
+ (t.func = {
+ pattern: /[\w-]+\([^)]*\).*/,
+ inside: { function: /^[^(]+/, rest: t },
+ }),
+ (e.languages.stylus = {
+ 'atrule-declaration': {
+ pattern: /(^[ \t]*)@.+/m,
+ lookbehind: !0,
+ inside: { atrule: /^@[\w-]+/, rest: t },
+ },
+ 'variable-declaration': {
+ pattern: /(^[ \t]*)[\w$-]+\s*.?=[ \t]*(?:\{[^{}]*\}|\S.*|$)/m,
+ lookbehind: !0,
+ inside: { variable: /^\S+/, rest: t },
+ },
+ statement: {
+ pattern: /(^[ \t]*)(?:else|for|if|return|unless)[ \t].+/m,
+ lookbehind: !0,
+ inside: { keyword: /^\S+/, rest: t },
+ },
+ 'property-declaration': {
+ pattern:
+ /((?:^|\{)([ \t]*))(?:[\w-]|\{[^}\r\n]+\})+(?:\s*:\s*|[ \t]+)(?!\s)[^{\r\n]*(?:;|[^{\r\n,]$(?!(?:\r?\n|\r)(?:\{|\2[ \t])))/m,
+ lookbehind: !0,
+ inside: {
+ property: {
+ pattern: /^[^\s:]+/,
+ inside: { interpolation: t.interpolation },
+ },
+ rest: t,
+ },
+ },
+ selector: {
+ pattern:
+ /(^[ \t]*)(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)(?:(?:\r?\n|\r)(?:\1(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)))*(?:,$|\{|(?=(?:\r?\n|\r)(?:\{|\1[ \t])))/m,
+ lookbehind: !0,
+ inside: {
+ interpolation: t.interpolation,
+ comment: t.comment,
+ punctuation: /[{},]/,
+ },
+ },
+ func: t.func,
+ string: t.string,
+ comment: {
+ pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,
+ lookbehind: !0,
+ greedy: !0,
+ },
+ interpolation: t.interpolation,
+ punctuation: /[{}()\[\];:.]/,
+ });
+})(Prism);