Correct the format-string example, and stop Swedish name data composing a triple letter

This commit is contained in:
lilleman
2026-08-27 23:16:29 +02:00
committed by lilleman-tw
parent 404650ecc2
commit cd25aea6f1
2 changed files with 15 additions and 6 deletions
+6 -3
View File
@@ -337,9 +337,12 @@ rejected at `New`.
may be a `{..path}` reference too (`{name|..en_US.person}`).
Inside a `format`, `0 1 A a` are **always** character classes — so a fixed digit
or letter must be escaped (`#1`, `#A`) or it becomes random. A format of
`100 Main St` renders e.g. `506 mdin street`, not `100 Main St`. For a value with
no tokens at all, use a bare string node (`"100 Main St"`), emitted verbatim.
or letter must be escaped (`#1`, `#A`) or it becomes random. Only those four
characters are classes: digits `2``9` and every other letter are literal. A
format of `100 Main St` renders e.g. `506 Mdin St` — the `1`, `0`, `0` and `a`
were random, the `M`, `in` and `St` were not. A half-fixed string is the trap:
`555-0100` keeps `555-` and randomises the last four digits. For a value with no
tokens at all, use a bare string node (`"100 Main St"`), emitted verbatim.
**Putting it together** (`person.json`):