grammar: add escape sequence for label and attr value
This commit is contained in:
parent
b9fa5785b4
commit
32b1fa5555
1 changed files with 11 additions and 1 deletions
12
grammar.js
12
grammar.js
|
@ -293,7 +293,17 @@ module.exports = grammar({
|
|||
dot: ($) => token("."),
|
||||
|
||||
_unquoted_string: ($) =>
|
||||
token(prec(PREC.UNQUOTED_STRING, /[^'"`|\n\s;{}]([^\n;{}]*[^\n\s;{}])?/)),
|
||||
repeat1(
|
||||
choice(
|
||||
$.escape_sequence,
|
||||
token(
|
||||
prec(
|
||||
PREC.UNQUOTED_STRING,
|
||||
/[^'"`\\|\n\s;{}]([^\\\n;{}]*[^\\\n\s;{}])?/
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
string: ($) =>
|
||||
choice(
|
||||
|
|
Loading…
Reference in a new issue