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': /[-+*\/%!^=]=?|@|&[&=]?|\|[|=]?|<<?=?|>>?=?/ |
}; |