Skip to content

Commit

Permalink
fix attribute names with $ in their names not being picked up for jsx
Browse files Browse the repository at this point in the history
  • Loading branch information
ceymard committed Dec 20, 2019
1 parent 2f49590 commit ffb9245
Show file tree
Hide file tree
Showing 16 changed files with 40 additions and 15 deletions.
2 changes: 1 addition & 1 deletion components/prism-abnf.min.js

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

2 changes: 1 addition & 1 deletion components/prism-batch.min.js

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

2 changes: 1 addition & 1 deletion components/prism-gherkin.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion components/prism-http.min.js

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

2 changes: 1 addition & 1 deletion components/prism-jsx.js
Expand Up @@ -3,7 +3,7 @@
var javascript = Prism.util.clone(Prism.languages.javascript);

Prism.languages.jsx = Prism.languages.extend('markup', javascript);
Prism.languages.jsx.tag.pattern= /<\/?(?:[\w.:-]+\s*(?:\s+(?:[\w.:-]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s{'">=]+|\{(?:\{(?:\{[^}]*\}|[^{}])*\}|[^{}])+\}))?|\{\.{3}[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\}))*\s*\/?)?>/i;
Prism.languages.jsx.tag.pattern= /<\/?(?:[\w.:-]+\s*(?:\s+(?:[\w.:$-]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s{'">=]+|\{(?:\{(?:\{[^}]*\}|[^{}])*\}|[^{}])+\}))?|\{\.{3}[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\}))*\s*\/?)?>/i;

Prism.languages.jsx.tag.inside['tag'].pattern = /^<\/?[^\s>\/]*/i;
Prism.languages.jsx.tag.inside['attr-value'].pattern = /=(?!\{)(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">]+)/i;
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 ffb9245

Please sign in to comment.