aboutsummaryrefslogtreecommitdiff
path: root/grammar.js
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2023-10-29 17:55:31 +0100
committerThomas Voss <mail@thomasvoss.com> 2023-10-29 17:55:31 +0100
commit4dde2d9838ba3ae9e39aed9007716e5e782f244c (patch)
tree9e85f9cdeee5502902a202b958c6aeb4c3ae8d35 /grammar.js
parent4ed241343f6babdb0b954c683c1408345bbeed30 (diff)
Make $._S pattern use ‘+’ instead of ‘*’v1.0.3
The previous pattern caused the parser to use infinite memory and eventually crash. Not good!
Diffstat (limited to 'grammar.js')
-rw-r--r--grammar.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/grammar.js b/grammar.js
index 8d0e5a5..e2cdbce 100644
--- a/grammar.js
+++ b/grammar.js
@@ -49,6 +49,6 @@ module.exports = grammar({
attribute_name: $ => /[a-zA-Z0-9_-]+/,
attribute_value: $ => /"(\\.|[^"\\])*"/,
- _S: $ => /\p{White_Space}*/u,
+ _S: $ => /\p{White_Space}+/u,
},
})