Skip to content

fix(markdown): recover unquoted colon in leafwiki_* frontmatter fields#1332

Merged
perber merged 1 commit into
mainfrom
fix/frontmatter-unquoted-colon-title
Jul 24, 2026
Merged

fix(markdown): recover unquoted colon in leafwiki_* frontmatter fields#1332
perber merged 1 commit into
mainfrom
fix/frontmatter-unquoted-colon-title

Conversation

@perber

@perber perber commented Jul 24, 2026

Copy link
Copy Markdown
Owner

An externally-authored page whose leafwiki_title (or other leafwiki_* string field) contains an unquoted colon, e.g. "ADR-0001: Filesystem as Source of Truth", failed YAML frontmatter parsing entirely and was silently dropped from the tree during filesystem reconstruction.

parseFrontmatterYAML now falls back to a real-parse-validated sanitizer that quotes leafwiki_* values which don't parse on their own (unquoted colons, but also stray backticks/@ signs), while leaving genuine YAML constructs (flow-collections, anchors, block scalars) alone so malformed ones keep failing loudly. The sanitizer is anchored to column 0 so it can never reach into an unrelated field's indented block-scalar content.

Frontmatter now exposes WasRepaired(), and node_store logs a warning when a file's frontmatter needed this recovery, so auto-repair isn't silent.

An externally-authored page whose leafwiki_title (or other leafwiki_*
string field) contains an unquoted colon, e.g. "ADR-0001: Filesystem as
Source of Truth", failed YAML frontmatter parsing entirely and was
silently dropped from the tree during filesystem reconstruction.

parseFrontmatterYAML now falls back to a real-parse-validated sanitizer
that quotes leafwiki_* values which don't parse on their own (unquoted
colons, but also stray backticks/@ signs), while leaving genuine YAML
constructs (flow-collections, anchors, block scalars) alone so malformed
ones keep failing loudly. The sanitizer is anchored to column 0 so it
can never reach into an unrelated field's indented block-scalar content.

Frontmatter now exposes WasRepaired(), and node_store logs a warning
when a file's frontmatter needed this recovery, so auto-repair isn't
silent.
@perber
perber merged commit 3f1756d into main Jul 24, 2026
9 checks passed
@perber
perber deleted the fix/frontmatter-unquoted-colon-title branch July 24, 2026 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant