mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-22 00:42:08 +02:00
style-guide: clarify placeholders (#15807)
This commit is contained in:
parent
f3251fa90c
commit
4d52aeda20
1 changed files with 1 additions and 6 deletions
|
@ -484,12 +484,7 @@ Keep the following guidelines in mind when choosing placeholders:
|
|||
|
||||
- If a command can optionally take 1 or more arguments of the same kind, use an ellipsis: `{{placeholder1 placeholder2 ...}}`.
|
||||
For instance, if multiple paths are expected, use `{{path/to/directory1 path/to/directory2 ...}}`.
|
||||
- If a command can optionally take 1 or more arguments of different kinds, use an ellipsis: `{{placeholder1|placeholder2|...}}`.
|
||||
If there are more than 5 possible values, you can use `|...` after the last item.
|
||||
- It's impossible to restrict the minimum or (and) maximum placeholder count via `ellipsis`.
|
||||
|
||||
It's up to the program to decide how to handle duplicating values, provided syntax
|
||||
tells no info about whether items are mutually exclusive or not.
|
||||
- If only one of the multiple options is possible, write it as: `{{placeholder1|placeholder2|placeholder3}}`. If there are more than 4 possible values, you can use `|...` after the last item.
|
||||
|
||||
#### Optional placeholders
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue