Skip to content

Commit

Permalink
JSX: Allow for one level of nesting. Fix #717
Browse files Browse the repository at this point in the history
  • Loading branch information
Golmote committed Aug 26, 2015
1 parent bcac7d4 commit 90c75d5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion components/prism-jsx.js
Original file line number Diff line number Diff line change
Expand Up @@ -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': /[={}[\];(),.:]/,
Expand Down
2 changes: 1 addition & 1 deletion components/prism-jsx.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 90c75d5

Please sign in to comment.