Skip to content

Commit 32d3f17

Browse files
authored
docs: document markdown parsing for all front-matter strings (#927)
q2 parses any string-valued YAML entry as markdown, like Pandoc, not just the title. The rule was documented only for description:, so authors missed the same Q-1-20 failure in other keys. Document the general rule, the !str opt-out for verbatim text, and link the Q-1-20 page.
1 parent 5fb0b70 commit 32d3f17

1 file changed

Lines changed: 13 additions & 4 deletions

File tree

‎claude-notes/instructions/writing-notes.md‎

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,22 @@ other strands go in its comment or in the body. Dates are ISO `YYYY-MM-DD`.
9797
Single-quote the title (write a `'` inside it as `''`): in single quotes a
9898
backslash escape such as `\@` reaches the markdown parser unchanged, while in
9999
double quotes YAML rejects it. The title is markdown, so code spans work.
100-
The `description:` is parsed as markdown too (it feeds the plans table), so
101-
every rule above applies inside front matter — a possessive like
102-
`connect-satellites'' build.sh` unescapes to apostrophe-plus-space and fails
103-
with Q-1-20. Rewording ("build.sh in connect-satellites") beats escaping.
104100
`scripts/claude-notes-plan-frontmatter.py` adds both keys to a plan that has
105101
only a `#` heading and a dated filename.
106102

103+
**Every string scalar in front matter is markdown, not just the title.** Like
104+
Pandoc, q2 parses any string-valued YAML entry — `title:`, `description:`, a
105+
sidebar label, a nested mapping value — as markdown, so every rule in the
106+
list above applies inside YAML too. The failure is Q-1-20 ("Failed to parse
107+
metadata value as markdown") and carries the same span diagnostics a body
108+
paragraph would: a possessive like `` `connect-satellites'' build.sh` ``
109+
unescapes to apostrophe-plus-space, a close quote without an open (rule 2).
110+
Plain values such as `status: in-progress` parse trivially; the rule bites on
111+
punctuation. Rewording beats escaping, but when the text must stay verbatim,
112+
tag the value `!str` (`description: !str "..."`) to skip the markdown parse
113+
entirely — YAML quoting still applies underneath the tag (`` `!str 'don''t'` ``).
114+
The user-facing reference is `docs/errors/yaml/Q-1-20.qmd`.
115+
107116
## Checking
108117

109118
Render the file you wrote:

0 commit comments

Comments
 (0)