fix(parser): read YAML quote escapes in frontmatter values #334

Merged
abiwab merged 1 commit from fix/frontmatter-quote-escapes into dev/1.6 2026-12-01 13:49:35 +01:00
Owner

Frontmatter values looked like YAML but their quotes were only stripped, so 'baker''s' showed baker''s.

  • Inside single quotes, '' is an apostrophe; inside double quotes, \" and \\\\ are a quote and a backslash (only these escapes, no full YAML parser).
  • An inline list splits only on commas outside quotes (['salt, pepper', 'x'] has two items).
  • Unquoted values unchanged; the formatter keeps frontmatter verbatim, so nothing to change there.
  • Tests in grammar-edge-cases.test.ts, a sentence in document-structure.mdx (en + fr), a patch changeset.

Checked: build, full bun test (4521), conformance (no golden change), fuzz 20k iterations clean.

Frontmatter values looked like YAML but their quotes were only stripped, so `'baker''s'` showed `baker''s`. - Inside single quotes, `''` is an apostrophe; inside double quotes, `\"` and `\\\\` are a quote and a backslash (only these escapes, no full YAML parser). - An inline list splits only on commas outside quotes (`['salt, pepper', 'x']` has two items). - Unquoted values unchanged; the formatter keeps frontmatter verbatim, so nothing to change there. - Tests in `grammar-edge-cases.test.ts`, a sentence in `document-structure.mdx` (en + fr), a `patch` changeset. Checked: build, full `bun test` (4521), conformance (no golden change), fuzz 20k iterations clean.
fix(parser): read YAML quote escapes in frontmatter values
All checks were successful
CI / Build & Test (pull_request) Successful in 7m40s
3db40150b7
abiwab merged commit cc7e1cfde6 into dev/1.6 2026-12-01 13:49:35 +01:00
abiwab deleted branch fix/frontmatter-quote-escapes 2026-12-01 13:49:36 +01:00
Sign in to join this conversation.
No description provided.