mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-07-03 04:37:48 +02:00
fixup: explicit codepoint annotations
This commit is contained in:
parent
c83244691a
commit
d75b1308db
|
|
@ -145,10 +145,11 @@ object = "{" [ member *( "," member ) ] "}"
|
||||||
member = string ":" value
|
member = string ":" value
|
||||||
array = "[" [ value *( "," value ) ] "]"
|
array = "[" [ value *( "," value ) ] "]"
|
||||||
number = [ "-" ] int
|
number = [ "-" ] int
|
||||||
int = %x30 / ( %x31-39 *DIGIT ) ; 0 or 1-9 *DIGIT (0-9)
|
int = %x30 / ( %x31-39 *DIGIT ) ; Integer without leading zeros
|
||||||
string = DQUOTE *char DQUOTE ; quoted chars
|
string = DQUOTE *char DQUOTE ; Quoted chars
|
||||||
char = unescaped / "\" escaped
|
char = unescaped / "\" escaped
|
||||||
unescaped = %x20-21 / %x23-5B / %x5D-10FFFF
|
unescaped = %x20-21 / %x23-5B / %x5D-10FFFF ; All UTF-8 codepoints except ASCII control
|
||||||
|
; characters, " and \
|
||||||
escaped = %x62 ; b backspace U+0008
|
escaped = %x62 ; b backspace U+0008
|
||||||
/ %x74 ; t tab U+0009
|
/ %x74 ; t tab U+0009
|
||||||
/ %x6E ; n line feed U+000A
|
/ %x6E ; n line feed U+000A
|
||||||
|
|
@ -156,9 +157,10 @@ escaped = %x62 ; b backspace U+0008
|
||||||
/ %x72 ; r carriage return U+000D
|
/ %x72 ; r carriage return U+000D
|
||||||
/ %x22 ; " quotation mark U+0022
|
/ %x22 ; " quotation mark U+0022
|
||||||
/ %x5C ; \ reverse solidus U+005C
|
/ %x5C ; \ reverse solidus U+005C
|
||||||
/ %s"u000" (%x30-37 / %x62 / %x65-66) ; all codepoints from u000X excluding the ones
|
/ %s"u000" (%x30-37 / %x62 / %x65-66) ; All ASCII control characters which have not been
|
||||||
; explicitly escaped above (0-7, b, e, f)
|
; escaped otherwise (for example \n).
|
||||||
/ %s"u000" (%x30-39 / %x61-66) ; u001X (0-9, a-f)
|
; u000X, where X is [0-7, b, e, f]
|
||||||
|
/ %s"u001" (%x30-39 / %x61-66) ; u001X, where X is [0-9, a-f]
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Examples
|
#### Examples
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue