Skip to content

Hide unparsable YAML front matter#413

Open
yusufm wants to merge 1 commit into
schuyler:mainfrom
yusufm:Codex/hide-invalid-yaml-frontmatter-019def52-b3da-7962-96cd-afa05d8d1592
Open

Hide unparsable YAML front matter#413
yusufm wants to merge 1 commit into
schuyler:mainfrom
yusufm:Codex/hide-invalid-yaml-frontmatter-019def52-b3da-7962-96cd-afa05d8d1592

Conversation

@yusufm
Copy link
Copy Markdown
Contributor

@yusufm yusufm commented May 3, 2026

Summary

  • advance the preview content offset after syntactic YAML front matter even when YAML parsing fails
  • keep front-matter title extraction from assuming the parsed object is always a dictionary
  • add regressions for invalid YAML and <title> values inside front matter

Related to #307.

Validation

  • xcodebuild test -workspace 'MacDown 3000.xcworkspace' -scheme MacDown -destination 'platform=macOS' -only-testing:MacDownTests/MPStringLookupTests/testFrontMatterContentOffsetWithInvalidYAML -only-testing:MacDownTests/MPRendererEdgeCaseTests/testRendererWithInvalidFrontMatterStillHidesFromPreview -only-testing:MacDownTests/MPRendererEdgeCaseTests/testRendererWithHTMLTitleInFrontMatterStillRendersBody

@yusufm yusufm marked this pull request as ready for review May 3, 2026 20:34
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