From 864348b674d27fb9c65e8b72512612f414c1a58d Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Mon, 24 Aug 2026 00:25:20 +0200 Subject: [PATCH] Pin canonical JSON escaping to minimal shortest-form --- spec/flavour.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spec/flavour.md b/spec/flavour.md index 8871345..d27ce43 100644 --- a/spec/flavour.md +++ b/spec/flavour.md @@ -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