Skip to content

Commit 0a1e9b0

Browse files
committed
fix(livescript) fix potential catastrophic backtracking
1 parent fbab868 commit 0a1e9b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/languages/livescript.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export default function(hljs) {
115115
{
116116
// regex can't start with space to parse x / 2 / 3 as two divisions
117117
// regex can't start with *, and it supports an "illegal" in the main mode
118-
begin: /\/(?![ *])(\\\/|.)*?\/[gim]*(?=\W)/
118+
begin: /\/(?![ *])(\\.|[^\\\n])*?\/[gim]*(?=\W)/
119119
}
120120
]
121121
},

0 commit comments

Comments
 (0)