Skip to content

Commit

Permalink
ERB: Fixed another case of exp backtracking
Browse files Browse the repository at this point in the history
  • Loading branch information
RunDevelopment committed May 1, 2021
1 parent 667bda7 commit 9f02440
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/prism-erb.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
});

Prism.hooks.add('before-tokenize', function (env) {
var erbPattern = /<%=?(?:[^\r\n]|[\r\n](?!=begin)|[\r\n]=begin\s[\s\S]*?^=end)+?%>/gm;
var erbPattern = /<%=?(?:[^\r\n]|[\r\n](?!=begin)|[\r\n]=begin\s(?:[^\r\n]|[\r\n](?!=end))*[\r\n]=end)+?%>/gm;
Prism.languages['markup-templating'].buildPlaceholders(env, 'erb', erbPattern);
});

Expand Down
2 changes: 1 addition & 1 deletion components/prism-erb.min.js

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

0 comments on commit 9f02440

Please sign in to comment.