Hide YAML front matter instead of rendering as HTML table#312
Merged
Conversation
- Fix contentOffset bug: consume trailing newlines after closing delimiter so Hoedown doesn't misinterpret residual text - Stop rendering frontmatter as HTML table: pass nil to MPHTMLFromMarkdown() instead of [frontMatter HTMLTable] - Rename UI label from "Detect Jekyll front-matter" to "Hide YAML front matter" in XIB and all 18 localization files - Add htmlDetectFrontMatter = YES to migration v3 so existing users get frontmatter hidden by default - Add tests for contentOffset fix, hidden frontmatter rendering, and migration behavior Related to #307 https://claude.ai/code/session_01TPXyihtEP28tBwYdjzPWzV
Contributor
Code Coverage ReportCurrent Coverage: 54.64% Coverage Details (Summary) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
---/...delimiter so Hoedown doesn't misinterpret residual text (e.g., treating content as a title)nilinstead of[frontMatter HTMLTable]toMPHTMLFromMarkdown()— when "Hide YAML front matter" is ON, frontmatter is completely hidden from the preview pane (matching VS Code behavior)htmlDetectFrontMatter = YESto migration v3 so existing and new users get frontmatter hidden by defaultRelated Issue
Related to #307
Manual Testing Plan
---delimiters render as horizontal rules when preference is OFF---\n(no blank line) renders as<h1>(contentOffset fix)...closing delimiter is handled correctlyTest Coverage
14 new tests across 3 test files:
MPStringLookupTests.m(contentOffset trailing newline consumption)MPRendererEdgeCaseTests.m(frontmatter hidden, no table, OFF behavior)MPPreferencesTests.m(migration, fresh install, user choice preserved)All 4 CI jobs pass (macOS 14, 15, 26, 15-intel).
Review Notes
NSObject+HTMLTabularizecode remains in codebase but is no longer used in the rendering pathhtmlDetectFrontMatteris unchangedhttps://claude.ai/code/session_01TPXyihtEP28tBwYdjzPWzV