fix: resolve SVG embeds correctly - #3
Open
puradox wants to merge 2 commits into
Open
Conversation
The link resolver rewrote a[href] and img/video/audio/iframe[src] but skipped <object data>. SVG wikilink embeds are rendered as <object type=image/svg+xml> to keep the SVG DOM live, so their data= path was never resolved and 404'd from notes outside the vault root. Resolve object[data] with the same transformLink pass used for the other resources. Fixes quartz-community/obsidian-flavored-markdown#2 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
puradox
marked this pull request as ready for review
July 14, 2026 02:12
Pairs with the engine-side slugifyFilePath wrapper that collapses hyphen runs from Obsidian-style ' - ' filenames: targets are matched against the engine-provided legacy slug variants, then the resolved href is collapsed (path only, anchors untouched) so links land on the canonical page. Site-specific; gate on an option before upstreaming. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
The link crawler resolves
a[href]and thesrcofimg,video,audio, andiframe, but<object>points at its resource throughdatarather thansrc— so those URLs were left untouched. This bites SVG embeds in particular: obsidian-flavored-markdown renders them as<object type="image/svg+xml">(to keep the SVG DOM live), so![[diagram.svg]]from a note in a subfolder ends up with an unresolved path and 404s (quartz-community/obsidian-flavored-markdown#2).This adds an
object[data]resolution pass next to the existingsrchandling, with a test checking that an<object data>resolves to the same URL as the equivalent<img src>.