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

Unified Diff: lib/src/prism/components/prism-r.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-qore.min.js ('k') | lib/src/prism/components/prism-r.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-r.js
diff --git a/lib/src/prism/components/prism-r.js b/lib/src/prism/components/prism-r.js
index f6d9e20e66bb38861d998f088771470779575d5a..ea925583c4f9fb292a6cea8832796c7f55b27cb3 100644
--- a/lib/src/prism/components/prism-r.js
+++ b/lib/src/prism/components/prism-r.js
@@ -1,19 +1,19 @@
Prism.languages.r = {
- 'comment': /#.+/,
+ 'comment': /#.*/,
'string': /(['"])(?:\\?.)*?\1/,
'percent-operator': {
// Includes user-defined operators
// and %%, %*%, %/%, %in%, %o%, %x%
- pattern: /%[^%]*?%/,
+ pattern: /%[^%\s]*%/,
alias: 'operator'
},
'boolean': /\b(?:TRUE|FALSE)\b/,
'ellipsis': /\.\.(?:\.|\d+)/,
'number': [
/\b(?:NaN|Inf)\b/,
- /\b(?:0x[\dA-Fa-f]+(?:\.\d*)?|\d*\.?\d+)(?:[EePp][+-]??\d+)?[iL]?\b/
+ /\b(?:0x[\dA-Fa-f]+(?:\.\d*)?|\d*\.?\d+)(?:[EePp][+-]?\d+)?[iL]?\b/
],
'keyword': /\b(?:if|else|repeat|while|function|for|in|next|break|NULL|NA|NA_integer_|NA_real_|NA_complex_|NA_character_)\b/,
- 'operator': /->>?|<?<-|[<>!=]=?|::?|&&?|\|\|?|[+\-*\/^$@~]/,
+ 'operator': /->?>?|<(?:=|<?-)?|[>=!]=?|::?|&&?|\|\|?|[+*\/^$@~]/,
'punctuation': /[(){}\[\],;]/
};
« no previous file with comments | « lib/src/prism/components/prism-qore.min.js ('k') | lib/src/prism/components/prism-r.min.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698