Skip to content

Commit

Permalink
fix(livescript) fix potential catastrophic backtracking
Browse files Browse the repository at this point in the history
  • Loading branch information
joshgoebel committed Nov 15, 2020
1 parent 432ff2c commit 743c4a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/languages/livescript.js
Expand Up @@ -115,7 +115,7 @@ export default function(hljs) {
{
// regex can't start with space to parse x / 2 / 3 as two divisions
// regex can't start with *, and it supports an "illegal" in the main mode
begin: /\/(?![ *])(\\\/|.)*?\/[gim]*(?=\W)/
begin: /\/(?![ *])(\\.|[^\\\n])*?\/[gim]*(?=\W)/
}
]
},
Expand Down

0 comments on commit 743c4a2

Please sign in to comment.