docs: remove redundant canonical formatting rules section

This commit is contained in:
Johann Schopplich
2025-10-30 12:45:16 +01:00
parent 858797f186
commit df68417d8b

View File

@@ -488,25 +488,11 @@ user:
preferences[0]: preferences[0]:
``` ```
## Canonical Formatting Rules
TOON formatting is deterministic and minimal:
- **Indentation**: 2 spaces per nesting level.
- **Lines**:
- `key: value` for primitives (single space after colon).
- `key:` for nested/empty objects (no trailing space on that line).
- **Arrays**:
- Delimiter encoding: Comma delimiters are implicit in array headers (e.g., `tags[3]:`, `items[2]{id,name}:`). Tab and pipe delimiters are explicitly shown in array headers (e.g., `tags[3|]:`, `items[2 ]{id name}:`).
- Primitive arrays inline: `key[N]: v1,v2` (comma) or `key[N<delim>]: v1<delim>v2` (tab/pipe).
- Tabular arrays: `key[N]{f1,f2}: …` (comma) or `key[N<delim>]{f1<delim>f2}: …` (tab/pipe).
- List items: two spaces, hyphen, space (`" - …"`).
- **Whitespace invariants**:
- No trailing spaces at end of any line.
- No trailing newline at end of output.
## Format Overview ## Format Overview
> [!NOTE]
> For precise formatting rules and implementation details, see the [SPEC.md](./SPEC.md).
### Objects ### Objects
Simple objects with primitive values: Simple objects with primitive values: