Skip to content

Commit ae712d7

Browse files
authored
Update syntax.md
1 parent b387301 commit ae712d7

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

spec/syntax.md

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -906,16 +906,28 @@ backslash = %x5C ; U+005C REVERSE SOLIDUS "\"
906906
### Whitespace
907907

908908
**_<dfn>Whitespace</dfn>_** is defined as one or more of
909-
U+0009 CHARACTER TABULATION (tab),
910-
U+000A LINE FEED (new line),
911-
U+000D CARRIAGE RETURN,
912-
U+3000 IDEOGRAPHIC SPACE,
913-
or U+0020 SPACE.
909+
`U+0009 CHARACTER TABULATION` (tab),
910+
`U+000A LINE FEED` (new line),
911+
`U+000D CARRIAGE RETURN`,
912+
`U+3000 IDEOGRAPHIC SPACE`,
913+
or `U+0020 SPACE`,
914+
optionally prepended with `U+200E LEFT-TO-RIGHT MARK`.
914915

915916
Inside _patterns_ and _quoted literals_,
916917
whitespace is part of the content and is recorded and stored verbatim.
917918
Whitespace is not significant outside translatable text, except where required by the syntax.
918919

920+
The character `U+200E LEFT-TO-RIGHT MARK` (LRM) MAY be prepended to _whitespace_ outside
921+
_patterns_ and _quoted literals_ to assist with presentation to users.
922+
Tools SHOULD generate these LRM characters following _identifiers_, _unquoted literals_, or
923+
_option_ values that use right-to-left characters so that the _message_ displays
924+
intelligibly in a left-to-right context.
925+
926+
This definition of _whitespace_ implements
927+
[UTR#31 Rule 3a-2](https://www.unicode.org/reports/tr31/#R3a-2).
928+
It is a profile of R3a-1 in that specification because only the
929+
whitespace characters listed are permitted as whitespace.
930+
919931
> [!NOTE]
920932
> The character U+3000 IDEOGRAPHIC SPACE is included in whitespace for
921933
> compatibility with certain East Asian keyboards and input methods,

0 commit comments

Comments
 (0)