Skip to content

Commit

Permalink
fix(latex) fix poly backtracking issue
Browse files Browse the repository at this point in the history
  • Loading branch information
joshgoebel committed Dec 3, 2020
1 parent d9f1cdb commit d496052
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/languages/latex.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export default function(hljs) {
const BEGIN_ENV = function(envname, starts_mode) {
return hljs.inherit(
{
begin: '\\\\begin(?=\\s*\\r?\\n?\\s*\\{' + envname + '\\})',
begin: '\\\\begin(?=[ \t]*(\\r?\\n[ \t]*)?\\{' + envname + '\\})',
keywords: {$pattern: /\\[a-zA-Z]+/, keyword: '\\begin'},
relevance: 0,
},
Expand Down

0 comments on commit d496052

Please sign in to comment.