aboutsummaryrefslogtreecommitdiff
path: root/grammar.js
diff options
context:
space:
mode:
Diffstat (limited to 'grammar.js')
-rw-r--r--grammar.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/grammar.js b/grammar.js
index 5849132..8d0e5a5 100644
--- a/grammar.js
+++ b/grammar.js
@@ -1,6 +1,6 @@
module.exports = grammar({
name: 'gsp',
-
+ extras: $ => [$._S],
rules: {
source_file: $ => repeat($.node),
@@ -43,10 +43,12 @@ module.exports = grammar({
),
),
- class_shorthand: $ => /\.[^\s]+/,
- id_shorthand: $ => /#[^\s]+/,
+ class_shorthand: $ => /\.[^\p{White_Space}]+/u,
+ id_shorthand: $ => /#[^\p{White_Space}]+/u,
attribute_name: $ => /[a-zA-Z0-9_-]+/,
attribute_value: $ => /"(\\.|[^"\\])*"/,
+
+ _S: $ => /\p{White_Space}*/u,
},
})