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

Unified Diff: polymer_1.0.4/bower_components/prism/components/prism-yaml.js

Issue 1205703007: Add polymer 1.0 to npm_modules (Closed) Base URL: https://chromium.googlesource.com/infra/third_party/npm_modules.git@master
Patch Set: Renamed folder to 1.0.4 Created 5 years, 6 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
Index: polymer_1.0.4/bower_components/prism/components/prism-yaml.js
diff --git a/polymer_1.0.4/bower_components/prism/components/prism-yaml.js b/polymer_1.0.4/bower_components/prism/components/prism-yaml.js
new file mode 100644
index 0000000000000000000000000000000000000000..6b45e8af3f02db3106f0090948bbbc4675442ad4
--- /dev/null
+++ b/polymer_1.0.4/bower_components/prism/components/prism-yaml.js
@@ -0,0 +1,44 @@
+Prism.languages.yaml = {
+ 'scalar': {
+ pattern: /([\-:]\s*(![^\s]+)?[ \t]*[|>])[ \t]*(?:(\n[ \t]+)[^\r\n]+(?:\3[^\r\n]+)*)/,
+ lookbehind: true,
+ alias: 'string'
+ },
+ 'comment': /#[^\n]+/,
+ 'key': {
+ pattern: /(\s*[:\-,[{\n?][ \t]*(![^\s]+)?[ \t]*)[^\n{[\]},#]+?(?=\s*:\s)/,
+ lookbehind: true,
+ alias: 'atrule'
+ },
+ 'directive': {
+ pattern: /((^|\n)[ \t]*)%[^\n]+/,
+ lookbehind: true,
+ alias: 'important'
+ },
+ 'datetime': {
+ pattern: /([:\-,[{]\s*(![^\s]+)?[ \t]*)(\d{4}-\d\d?-\d\d?([tT]|[ \t]+)\d\d?:\d{2}:\d{2}(\.\d*)?[ \t]*(Z|[-+]\d\d?(:\d{2})?)?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(:\d{2}(\.\d*)?)?)(?=[ \t]*(\n|$|,|]|}))/,
+ lookbehind: true,
+ alias: 'number'
+ },
+ 'boolean': {
+ pattern: /([:\-,[{]\s*(![^\s]+)?[ \t]*)(true|false)[ \t]*(?=\n|$|,|]|})/i,
+ lookbehind: true,
+ alias: 'important'
+ },
+ 'null': {
+ pattern: /([:\-,[{]\s*(![^\s]+)?[ \t]*)(null|~)[ \t]*(?=\n|$|,|]|})/i,
+ lookbehind: true,
+ alias: 'important'
+ },
+ 'string': {
+ pattern: /([:\-,[{]\s*(![^\s]+)?[ \t]*)("(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*')(?=[ \t]*(\n|$|,|]|}))/,
+ lookbehind: true
+ },
+ 'number': {
+ pattern: /([:\-,[{]\s*(![^\s]+)?[ \t]*)[+\-]?(0x[\dA-Fa-f]+|0o[0-7]+|(\d+\.?\d*|\.?\d+)(e[\+\-]?\d+)?|\.inf|\.nan)[ \t]*(?=\n|$|,|]|})/i,
+ lookbehind: true
+ },
+ 'tag': /![^\s]+/,
+ 'important': /[&*][\w]+/,
+ 'punctuation': /([:[\]{}\-,|>?]|---|\.\.\.)/
+};

Powered by Google App Engine
This is Rietveld 408576698