Skip to content

Commit

Permalink
Correct / extend wildcard YAML weighted random selection example (#781)
Browse files Browse the repository at this point in the history
  • Loading branch information
shiverczar authored May 26, 2024
1 parent 1567e78 commit 6aa51c4
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions docs/SYNTAX.md
Original file line number Diff line number Diff line change
Expand Up @@ -329,11 +329,13 @@ The last two entries are ignore since they don't store arrays.
A handy feature of YAML files is that they provide an easy way to add weights to wildcards, something which isn't possible using standard text files. Here is an example:

```yaml
{
2::red
| 3::blue
| 1:: green
}
# colors.yaml
colors:
- "{
2::red
|3::blue
|1::green
}"
```
#### JSON files
Expand Down

0 comments on commit 6aa51c4

Please sign in to comment.