1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
!(function (e) {
var n = /\$(?:\w[a-z\d]*(?:_[^\x00-\x1F\s"'\\()$]*)?|\{[^}\s"'\\]+\})/i;
e.languages.nginx = {
comment: { pattern: /(^|[\s{};])#.*/, lookbehind: !0, greedy: !0 },
directive: {
pattern:
/(^|\s)\w(?:[^;{}"'\\\s]|\\.|"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|\s+(?:#.*(?!.)|(?![#\s])))*?(?=\s*[;{])/,
lookbehind: !0,
greedy: !0,
inside: {
string: {
pattern:
/((?:^|[^\\])(?:\\\\)*)(?:"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/,
lookbehind: !0,
greedy: !0,
inside: {
escape: { pattern: /\\["'\\nrt]/, alias: 'entity' },
variable: n,
},
},
comment: { pattern: /(\s)#.*/, lookbehind: !0, greedy: !0 },
keyword: { pattern: /^\S+/, greedy: !0 },
boolean: { pattern: /(\s)(?:off|on)(?!\S)/, lookbehind: !0 },
number: { pattern: /(\s)\d+[a-z]*(?!\S)/i, lookbehind: !0 },
variable: n,
},
},
punctuation: /[{};]/,
};
})(Prism);
|