Commit Graph

3 Commits

Author SHA1 Message Date
fb5d11dd6a feat: unified, editable frontmatter editor in publish modal
All checks were successful
CI / test (push) Successful in 16s
- Preset fields (from settings) are now seeded as editable/deletable rows in
  the modal alongside custom ones, using one consistent row style.
- The note's own merged frontmatter is shown as read-only (disabled) rows at
  the top of the list (only when 'Merge document frontmatter' is on, and only
  for keys not overridden by an editable row).
- Drops the separate read-only 'resolved' text preview; the rows are the
  WYSIWYG result.

Adds pure, unit-tested composeFrontmatter()/docFrontmatterToPairs() and removes
the superseded resolveFrontmatter(). Editable rows are authoritative: on a key
collision they override the merged document field. Presets are deep-copied so
editing rows never mutates saved settings.

Co-Authored-By: Claude
2026-06-19 03:21:04 +00:00
c24a7e2a11 fix: quote YAML-special and numeric frontmatter values
formatValue now detects YAML-special tokens (true/false/null/yes/no/on/off/y/n/~)
and numeric-looking strings, quoting them via JSON.stringify so YAML parsers
cannot misread them as booleans or numbers. ISO date strings (YYYY-MM-DD) are
exempt and remain bare for readability. Adds four covering tests.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-19 01:49:33 +00:00
f2edd9b0ab feat: frontmatter parse/resolve/serialize
Co-Authored-By: Claude
2026-06-19 01:44:24 +00:00