mirror of https://github.com/kdl-org/kdl.git
Exclude hex above max Unicode Scalar Value
simplify surrogate regex to use ranges
This commit is contained in:
parent
7322f37800
commit
aa9a4439a5
|
|
@ -983,10 +983,8 @@ string-character :=
|
||||||
[^\\"] - disallowed-literal-code-points
|
[^\\"] - disallowed-literal-code-points
|
||||||
ws-escape := '\\' (unicode-space | newline)+
|
ws-escape := '\\' (unicode-space | newline)+
|
||||||
hex-digit := [0-9a-fA-F]
|
hex-digit := [0-9a-fA-F]
|
||||||
hex-unicode := hex-digit{1, 6} - surrogates
|
hex-unicode := [\u{0}-\u{10FFFF}] - surrogate // Unicode Scalar Value₁₆
|
||||||
surrogates := [dD][8-9a-fA-F]hex-digit{2}
|
surrogate := [\u{D800}-\u{DFFF}]
|
||||||
// U+D800-DFFF: D 8 00
|
|
||||||
// D F FF
|
|
||||||
|
|
||||||
raw-string := '#' raw-string-quotes '#' | '#' raw-string '#'
|
raw-string := '#' raw-string-quotes '#' | '#' raw-string '#'
|
||||||
raw-string-quotes :=
|
raw-string-quotes :=
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
no "Higher than max Unicode Scalar Value \u{10FFFF} \u{11FFFF}"
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
no "Non-canonical format for Unicode Scalar Value with extra 0s: \u{00FFFF} instead of \u{FFFF}"
|
||||||
Loading…
Reference in New Issue