Skip to content

Commit 572caeb

Browse files
committed
use * for selection wildcard
as suggested in #270
1 parent 0475f8f commit 572caeb

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

spec/compromise-syntax.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -151,14 +151,14 @@ It needs to support multiple selectors.
151151
In this syntax, a list of N selectors is followed by a list of pairs where
152152
the first element of each pair is a list of N value literals and
153153
the second element of each pair is a pattern.
154-
A `_` is a wildcard value that always matches.
154+
A `*` is a wildcard value that always matches.
155155
The last variant must have a list of all wildcard values.
156156
```
157157
[{$count :plural offset=1 grouping=always} {$gender}]
158158
[1 female] {{$name} added you to her circles.}
159159
[1 male] {{$name} added you to his circles.}
160-
[1 _] {{$name} added you to their circles.}
161-
[_ _] {{$name} added you and {#count} others to their circles.}
160+
[1 *] {{$name} added you to their circles.}
161+
[* *] {{$name} added you and {#count} others to their circles.}
162162
```
163163

164164
Lists are enclosed in square brackets, reminiscent of Python lists.
@@ -169,7 +169,7 @@ the same pair of delimiters as literals in placeholder (for consistency),
169169
or whether to make that optional.
170170
(The `[]` value list syntax already indicates that value literals are enclosed.)
171171
Some literals may require it if they contain spaces.
172-
The `_` should probably never be enclosed in literal delimiters.
172+
The `*` should probably never be enclosed in literal delimiters.
173173

174174
Selector syntax follows placeholder syntax,
175175
except that a function must be specified.
@@ -222,8 +222,8 @@ $relDate={$date :relativeDateTime fields=Mdjm}
222222
[{$count :plural offset=1} {$gender}]
223223
[1 female] {{$name} added you to her circles {$relDate}.}
224224
[1 male] {{$name} added you to his circles {$relDate}.}
225-
[1 _] {{$name} added you to their circles {$relDate}.}
226-
[_ _] {{$name} added you and {#count} others to their circles {$relDate}.}
225+
[1 *] {{$name} added you to their circles {$relDate}.}
226+
[* *] {{$name} added you and {#count} others to their circles {$relDate}.}
227227
```
228228

229229
When a named expression is used in a pattern placeholder, then no function must be specified.

0 commit comments

Comments
 (0)