Flavour spec 1a: the directive grammar, canonical form, opaque carry #3

Merged
lilleman merged 7 commits from flavour-grammar into main 2026-08-24 00:49:26 +02:00
Showing only changes of commit 864348b674 - Show all commits
+3 -2
View File
@@ -65,8 +65,9 @@ colon run inside a code fence or opaque carry is content. Canonical form uses mi
**Attributes**: `{key=value key2="two words"}`. A bare value matches `[A-Za-z0-9_-]+`; any other
value is double-quoted with JSON string escaping (`\"` `\\` `\n` `\t` `\uXXXX`, …) — total over
Unicode, and raw newlines never appear inside quotes. All values are strings at the grammar
level; each node's section assigns types. Canonical form orders keys alphabetically and spells
values bare wherever allowed.
level; each node's section assigns types. Canonical form orders keys alphabetically, spells
values bare wherever allowed, and inside quotes escapes only what it must, using the shortest
escape form.
**Escaping**: the emitter backslash-escapes whatever literal text would otherwise parse as
directive syntax — the leading `:` of a would-be directive, `]` inside content; a backslash