From dc45f7cd21fe51a4cbb23fb36459982d1e06a6d5 Mon Sep 17 00:00:00 2001 From: Josh Goebel Date: Thu, 12 Nov 2020 06:41:49 -0500 Subject: [PATCH] fix(livescript) fix potential catastrophic backtracking --- src/languages/livescript.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/languages/livescript.js b/src/languages/livescript.js index 4584ef82e2..97c4f244ad 100644 --- a/src/languages/livescript.js +++ b/src/languages/livescript.js @@ -81,7 +81,7 @@ 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)/ } ] },