Skip to content

Strip YAML frontmatter from markdown before parsing - #45

Merged
backnotprop merged 1 commit into
mainfrom
feature/yaml-frontmatter-handling
Jan 9, 2026
Merged

backnotprop merged 1 commit into
mainfrom
feature/yaml-frontmatter-handling

Conversation

@backnotprop

Copy link
Copy Markdown
Owner

Summary

  • Fixes Handle YAML frontmatter in Markdown preview #43 - YAML frontmatter renders badly in markdown preview
  • Added stripFrontmatter() function to parser that removes frontmatter before parsing
  • Frontmatter between --- delimiters at file start is now stripped

Test plan

  • Create a plan with YAML frontmatter at the top
  • Verify frontmatter is not rendered in the plan preview
  • Verify normal --- horizontal rules still work mid-document

🤖 Generated with Claude Code

@backnotprop
backnotprop force-pushed the feature/yaml-frontmatter-handling branch from d35363a to 82dec06 Compare January 9, 2026 17:21
Fixes #43 - YAML frontmatter was rendering as ugly text because
the parser treated it as regular markdown content.

Changes:
- Added extractFrontmatter() to parser that parses YAML key-value pairs
- Added FrontmatterCard component that renders frontmatter nicely
- Supports string values and arrays (rendered as tags)
- Card appears at top of plan with muted background

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@backnotprop
backnotprop force-pushed the feature/yaml-frontmatter-handling branch from 82dec06 to 9e9d6c3 Compare January 9, 2026 17:21
@backnotprop
backnotprop merged commit 0926837 into main Jan 9, 2026
@backnotprop
backnotprop deleted the feature/yaml-frontmatter-handling branch January 9, 2026 17:23
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.

Handle YAML frontmatter in Markdown preview

1 participant