10000 Add a note about representing the string `*` in a key (#1002) · unicode-org/message-format-wg@a664331 · GitHub
[go: up one dir, main page]

Skip to content

Commit a664331

Browse files
aphillipseemeli
andauthored
Add a note about representing the string * in a key (#1002)
* Add a note about representing the string `*` in a key This addresses the problem by spelling out the difference between `|*|` and `*` in keys. * Fix typo * Update spec/syntax.md Co-authored-by: Eemeli Aro <eemeli@mozilla.com> --------- Co-authored-by: Eemeli Aro <eemeli@mozilla.com>
1 parent 3e9cb6d commit a664331

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

spec/syntax.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,16 @@ A _key_ can be either a _literal_ value or the "catch-all" key `*`.
461461
The **_<dfn>catch-all key</dfn>_** is a special key, represented by `*`,
462462
that matches all values for a given _selector_.
463463

464+
> [!NOTE]
465+
> To represent a _key_ consisting of the character `*` U+002A ASTERISK,
466+
> use a _quoted literal_:
467+
> ```
468+
> .input {$value :string}
469+
> .match $value
470+
> |*| {{Matches the string *}}
471+
> * {{Matches any other string}}
472+
> ```
473+
464474
The value of each _literal_ _key_ MUST be treated as if it were in
465475
[Unicode Normalization Form C](https://unicode.org/reports/tr15/) ("NFC").
466476
Two _literal_ _keys_ are considered equal if they are canonically equivalent strings,

0 commit comments

Comments
 (0)
0