Skip to content

Commit

Permalink
ASP.NET: Regexp optimisation
Browse files Browse the repository at this point in the history
  • Loading branch information
Golmote committed Oct 22, 2017
1 parent fbe39c9 commit 43d9f36
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/prism-aspnet.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Prism.languages.aspnet = Prism.languages.extend('markup', {
}
});
// Regexp copied from prism-markup, with a negative look-ahead added
Prism.languages.aspnet.tag.pattern = /<(?!%)\/?[^\s>\/]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\\1|\\?(?!\1)[\s\S])*\1|[^\s'">=]+))?)*\s*\/?>/i;
Prism.languages.aspnet.tag.pattern = /<(?!%)\/?[^\s>\/]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i;

// match directives of attribute value foo="<% Bar %>"
Prism.languages.insertBefore('inside', 'punctuation', {
Expand Down
2 changes: 1 addition & 1 deletion components/prism-aspnet.min.js

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

0 comments on commit 43d9f36

Please sign in to comment.