Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d496052

Browse filesBrowse files
committed
fix(latex) fix poly backtracking issue
1 parent d9f1cdb commit d496052
Copy full SHA for d496052

File tree

1 file changed

+1
-1
lines changed
Filter options

1 file changed

+1
-1
lines changed

‎src/languages/latex.js

Copy file name to clipboardExpand all lines: src/languages/latex.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ export default function(hljs) {
172172
const BEGIN_ENV = function(envname, starts_mode) {
173173
return hljs.inherit(
174174
{
175-
begin: '\\\\begin(?=\\s*\\r?\\n?\\s*\\{' + envname + '\\})',
175+
begin: '\\\\begin(?=[ \t]*(\\r?\\n[ \t]*)?\\{' + envname + '\\})',
176176
keywords: {$pattern: /\\[a-zA-Z]+/, keyword: '\\begin'},
177177
relevance: 0,
178178
},

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.