Skip to content

Commit

Permalink
Latte: Fixed exponential backtracking
Browse files Browse the repository at this point in the history
  • Loading branch information
RunDevelopment committed Dec 31, 2020
1 parent 0a3932f commit bf29575
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/prism-latte.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
if (env.language !== 'latte') {
return;
}
var lattePattern = /\{\*[\s\S]*?\*\}|\{[^'"\s{}*](?:[^"'/{}]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|\/\*[\s\S]*?\*\/)*?\}/g;
var lattePattern = /\{\*[\s\S]*?\*\}|\{[^'"\s{}*](?:[^"'/{}]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|\/\*(?:[^*]|\*(?!\/))*\*\/)*?\}/g;
Prism.languages['markup-templating'].buildPlaceholders(env, 'latte', lattePattern);
env.grammar = markupLatte;
});
Expand Down
2 changes: 1 addition & 1 deletion components/prism-latte.min.js

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

0 comments on commit bf29575

Please sign in to comment.