Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(638)

Side by Side Diff: lib/src/prism/components/prism-clike.js

Issue 1418513006: update elements and fix some bugs (Closed) Base URL: git@github.com:dart-lang/polymer_elements.git@master
Patch Set: code review updates Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/src/prism/components/prism-c.min.js ('k') | lib/src/prism/components/prism-clike.min.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 };
OLDNEW
« no previous file with comments | « lib/src/prism/components/prism-c.min.js ('k') | lib/src/prism/components/prism-clike.min.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698