Skip to content

Commit d013aab

Browse files
Fix exponential backtracking
1 parent ae060de commit d013aab

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/languages/dotenv.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export default {
4949
},
5050
{
5151
pattern:
52-
/(?<==\s*)(?:(['"`])(?:\\.|(?!\1)[\s\S])*?\1|\S.*?\S)(?=\s*$|\s+#.*$)/m,
52+
/(?<==\s*)(?:(['"`])(?:\\[\s\S]|(?!\1)[^\\])*?\1|\S(?:.*?\S)?)(?=\s*$|\s+#.*$)/m,
5353
alias: 'string',
5454
inside: {
5555
'command-substitution': {

0 commit comments

Comments
 (0)