From 4ed241343f6babdb0b954c683c1408345bbeed30 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Sat, 28 Oct 2023 15:25:34 +0200 Subject: Support unicode whitespace --- src/grammar.json | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/grammar.json') diff --git a/src/grammar.json b/src/grammar.json index 150b1a5..ae2f4ab 100644 --- a/src/grammar.json +++ b/src/grammar.json @@ -180,11 +180,11 @@ }, "class_shorthand": { "type": "PATTERN", - "value": "\\.[^\\s]+" + "value": "\\.[^\\p{White_Space}]+" }, "id_shorthand": { "type": "PATTERN", - "value": "#[^\\s]+" + "value": "#[^\\p{White_Space}]+" }, "attribute_name": { "type": "PATTERN", @@ -193,12 +193,16 @@ "attribute_value": { "type": "PATTERN", "value": "\"(\\\\.|[^\"\\\\])*\"" + }, + "_S": { + "type": "PATTERN", + "value": "\\p{White_Space}*" } }, "extras": [ { - "type": "PATTERN", - "value": "\\s" + "type": "SYMBOL", + "name": "_S" } ], "conflicts": [], -- cgit v1.2.3