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

Unified Diff: lib/src/prism/components/prism-wiki.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-vim.min.js ('k') | lib/src/prism/components/prism-wiki.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-wiki.js
diff --git a/lib/src/prism/components/prism-wiki.js b/lib/src/prism/components/prism-wiki.js
index 5ee978769ae217a30660085afe817892f7210e46..4a5f12814220c264ccf91daed362054c51defd19 100644
--- a/lib/src/prism/components/prism-wiki.js
+++ b/lib/src/prism/components/prism-wiki.js
@@ -12,18 +12,19 @@ Prism.languages.wiki = Prism.languages.extend('markup', {
}
},
'emphasis': {
- pattern: /('{2,4}).+?\1/,
+ // TODO Multi-line
+ pattern: /('{2,5}).+?\1/,
inside: {
'bold italic': {
- pattern: /('''').+?(?=\1)/,
+ pattern: /(''''').+?(?=\1)/,
lookbehind: true
},
'bold': {
- pattern: /(''').+?(?=\1)/,
+ pattern: /(''')[^'](?:.*?[^'])?(?=\1)/,
lookbehind: true
},
'italic': {
- pattern: /('').+?(?=\1)/,
+ pattern: /('')[^'](?:.*?[^'])?(?=\1)/,
lookbehind: true
},
'punctuation': /^''+|''+$/
@@ -34,13 +35,13 @@ Prism.languages.wiki = Prism.languages.extend('markup', {
alias: 'punctuation'
},
'url': [
- /ISBN +(?:97[89][ -]?)?(?:\d[ -]?){9}[\dx]\b/i,
- /(?:RFC|PMID) +\d+/,
- /\[\[.+?\]\]/,
- /\[.+?\]/
+ /ISBN +(?:97[89][ -]?)?(?:\d[ -]?){9}[\dx]\b|(?:RFC|PMID) +\d+/i,
+ /\[\[.+?\]\]|\[.+?\]/
],
'variable': [
/__[A-Z]+__/,
+ // FIXME Nested structures should be handled
+ // {{formatnum:{{#expr:{{{3}}}}}}}
/\{{3}.+?\}{3}/,
/\{\{.+?}}/
],
« no previous file with comments | « lib/src/prism/components/prism-vim.min.js ('k') | lib/src/prism/components/prism-wiki.min.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698