fix(parser): extract wikilinks and embeds from YAML frontmatter#7
Merged
nicholasjpaterno merged 1 commit intoEpistates:mainfrom Mar 22, 2026
Merged
Conversation
Obsidian vaults commonly store wikilinks in frontmatter fields:
Area: "[[My Hub]]"
Links:
- "[[Doc A]]"
- "[[Doc B]]"
Previously, the parser stripped frontmatter before the regex pass,
making these links invisible to the link graph, broken link detection,
and backlink counts.
The fix adds a dedicated frontmatter scan between Phase 1 (pulldown-cmark)
and Phase 2 (body regex) that extracts [[wikilink]] and ![[embed]] patterns
from the raw YAML text using the same regexes as the body pass. Found links
are appended to the existing wikilinks/embeds vectors, so downstream graph
resolution and health analysis work without any changes.
Changes:
- Add parse_frontmatter_wikilinks() method to ParseEngine
- Call it from parse() when frontmatter exists and wikilinks are enabled
- 12 new tests covering all frontmatter link scenarios
No changes to turbovault-graph, turbovault-tools, or any other crate.
Contributor
|
Thanks for making another PR @AntttMan i’m taking a look now! |
Contributor
|
Perfect, thanks for this one @AntttMan! |
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.
Obsidian vaults commonly store wikilinks in frontmatter fields:
Previously, the parser stripped frontmatter before the regex pass, making these links invisible to the link graph, broken link detection, and backlink counts.
The fix adds a dedicated frontmatter scan between Phase 1 (pulldown-cmark) and Phase 2 (body regex) that extracts [[wikilink]] and ![[embed]] patterns from the raw YAML text using the same regexes as the body pass. Found links are appended to the existing wikilinks/embeds vectors, so downstream graph resolution and health analysis work without any changes.
Changes:
No changes to turbovault-graph, turbovault-tools, or any other crate.