Skip to content

Commit dc45f7c

Browse files
committed
fix(livescript) fix potential catastrophic backtracking
1 parent 0a2624a commit dc45f7c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/languages/livescript.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ function(hljs) {
8181
{
8282
// regex can't start with space to parse x / 2 / 3 as two divisions
8383
// regex can't start with *, and it supports an "illegal" in the main mode
84-
begin: /\/(?![ *])(\\\/|.)*?\/[gim]*(?=\W)/
84+
begin: /\/(?![ *])(\\.|[^\\\n])*?\/[gim]*(?=\W)/
8585
}
8686
]
8787
},

0 commit comments

Comments
 (0)