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

Unified Diff: lib/src/prism/components/prism-rust.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, 2 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/src/prism/components/prism-ruby.min.js ('k') | lib/src/prism/components/prism-rust.min.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/prism/components/prism-rust.js
diff --git a/lib/src/prism/components/prism-rust.js b/lib/src/prism/components/prism-rust.js
index 0c320d21d5300428bff59488c8cd8c0463dd7eb5..68ef0ace4006afb302746d2bff240e0bb1e8210f 100644
--- a/lib/src/prism/components/prism-rust.js
+++ b/lib/src/prism/components/prism-rust.js
@@ -12,7 +12,7 @@ Prism.languages.rust = {
lookbehind: true
},
{
- pattern: /(^|[^\\:])\/\/.*?(\r?\n|$)/,
+ pattern: /(^|[^\\:])\/\/.*/,
lookbehind: true
}
],
@@ -38,7 +38,7 @@ Prism.languages.rust = {
},
// Hex, oct, bin, dec numbers with visual separators and type suffix
- 'number': /\b-?(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(\d(_?\d)*)?\.?\d(_?\d)*([Ee][+-]?\d+)?)(?:_?(?:[iu](?:8|16|32)?|f32|f64))?\b/,
+ 'number': /\b-?(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(\d(_?\d)*)?\.?\d(_?\d)*([Ee][+-]?\d+)?)(?:_?(?:[iu](?:8|16|32|64)?|f32|f64))?\b/,
// Closure params should not be confused with bitwise OR |
'closure-params': {
@@ -48,6 +48,6 @@ Prism.languages.rust = {
'operator': /[&*]/
}
},
- 'punctuation': /[{}[\];(),.:]|->/,
- 'operator': /[-+]{1,2}|!=?|<=?|>=?|={1,3}|&&?|\|\|?|\*|\/|\^|%|<<|>>@/
+ 'punctuation': /[{}[\];(),:]|\.+|->/,
+ 'operator': /[-+*\/%!^=]=?|@|&[&=]?|\|[|=]?|<<?=?|>>?=?/
};
« no previous file with comments | « lib/src/prism/components/prism-ruby.min.js ('k') | lib/src/prism/components/prism-rust.min.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698