You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
sweep: a markdown link's #heading stays percent-encoded, so an embed of Note.md#My%20Heading shows the whole note #252
A markdown link whose destination has no scheme ... its data-href the destination percent-decoded, its target the part before #.
and an embed "with a heading subpath only its section".
Where (commit 83fb2a5): internal/render/links.go lines 92-98, markdownDestination: the destination is cut at #, only the part before it is decoded (url.PathUnescape(target)), and the rest is kept as it is (l.Subpath = "#" + sub).
So  keeps #My%20Heading, finds no heading My Heading, and embeds the whole note. The link's data-href keeps %20 too.
Why it matters: Obsidian writes markdown-format links to a heading with %20 for each space. Such an embed shows the whole note, not the section, and the spec says the destination is decoded.
Suggested fix: Percent-decode the subpath as well as the target (after the cut at the first #), with a test for a heading that has a space.
Activity
fix: the sweep issues #250, #251, #252 and #253 (#259)