OLD | NEW |
1 Prism.languages.clike = { | 1 Prism.languages.clike = { |
2 'comment': [ | 2 'comment': [ |
3 { | 3 { |
4 pattern: /(^|[^\\])\/\*[\w\W]*?\*\//, | 4 pattern: /(^|[^\\])\/\*[\w\W]*?\*\//, |
5 lookbehind: true | 5 lookbehind: true |
6 }, | 6 }, |
7 { | 7 { |
8 pattern: /(^|[^\\:])\/\/.*/, | 8 pattern: /(^|[^\\:])\/\/.*/, |
9 lookbehind: true | 9 lookbehind: true |
10 } | 10 } |
11 ], | 11 ], |
12 » 'string': /("|')(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, | 12 » 'string': /(["'])(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, |
13 'class-name': { | 13 'class-name': { |
14 » » pattern: /((?:(?:class|interface|extends|implements|trait|instan
ceof|new)\s+)|(?:catch\s+\())[a-z0-9_\.\\]+/i, | 14 » » pattern: /((?:\b(?:class|interface|extends|implements|trait|inst
anceof|new)\s+)|(?:catch\s+\())[a-z0-9_\.\\]+/i, |
15 lookbehind: true, | 15 lookbehind: true, |
16 inside: { | 16 inside: { |
17 punctuation: /(\.|\\)/ | 17 punctuation: /(\.|\\)/ |
18 } | 18 } |
19 }, | 19 }, |
20 'keyword': /\b(if|else|while|do|for|return|in|instanceof|function|new|tr
y|throw|catch|finally|null|break|continue)\b/, | 20 'keyword': /\b(if|else|while|do|for|return|in|instanceof|function|new|tr
y|throw|catch|finally|null|break|continue)\b/, |
21 'boolean': /\b(true|false)\b/, | 21 'boolean': /\b(true|false)\b/, |
22 'function': /[a-z0-9_]+(?=\()/i, | 22 'function': /[a-z0-9_]+(?=\()/i, |
23 » 'number': /\b-?(0x[\dA-Fa-f]+|\d*\.?\d+([Ee]-?\d+)?)\b/, | 23 » 'number': /\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)\b/i, |
24 » 'operator': /[-+]{1,2}|!|<=?|>=?|={1,3}|&{1,2}|\|?\||\?|\*|\/|~|\^|%/, | 24 » 'operator': /--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/, |
25 'punctuation': /[{}[\];(),.:]/ | 25 'punctuation': /[{}[\];(),.:]/ |
26 }; | 26 }; |
OLD | NEW |