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

Unified Diff: lib/src/prism/components/prism-jsx.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-javascript.min.js ('k') | lib/src/prism/components/prism-jsx.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-jsx.js
diff --git a/lib/src/prism/components/prism-jsx.js b/lib/src/prism/components/prism-jsx.js
index 10c5f097bcd4cf28d36f28f97f09d6d9c4bb339e..a777484f64f1c0a259dffb4e8e573af801e65c49 100644
--- a/lib/src/prism/components/prism-jsx.js
+++ b/lib/src/prism/components/prism-jsx.js
@@ -9,7 +9,8 @@ Prism.languages.jsx.tag.inside['attr-value'].pattern = /=[^\{](?:('|")[\w\W]*?(\
Prism.languages.insertBefore('inside', 'attr-value',{
'script': {
- pattern: /=(\{[\w\W]*?\})/i,
+ // Allow for one level of nesting
+ pattern: /=(\{(?:\{[^}]*\}|[^}])+\})/i,
inside: {
'function' : Prism.languages.javascript.function,
'punctuation': /[={}[\];(),.:]/,
« no previous file with comments | « lib/src/prism/components/prism-javascript.min.js ('k') | lib/src/prism/components/prism-jsx.min.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698