Skip to content

Resolve dot-relative Markdown links from source files#459

Open
Entr0zy wants to merge 1 commit into
Feel-ix-343:mainfrom
Entr0zy:fix-relative-markdown-links
Open

Resolve dot-relative Markdown links from source files#459
Entr0zy wants to merge 1 commit into
Feel-ix-343:mainfrom
Entr0zy:fix-relative-markdown-links

Conversation

@Entr0zy

@Entr0zy Entr0zy commented May 22, 2026

Copy link
Copy Markdown

Summary

/claim #274

This updates Markdown link resolution so dot-relative paths are resolved from the Markdown file containing the reference instead of being treated as workspace-root-relative. That allows nested files to resolve links such as ./target and ../target against nearby notes while preserving existing root-relative behavior for paths like folder/file.

Changes

  • Pass the reference source path into the path-matching helper.
  • Resolve ./ and ../ link targets relative to the source file parent before comparing them with indexed vault paths.
  • Add regression coverage for same-directory and parent-directory relative links from nested files.

Verification

  • git diff --check passed.
  • Added targeted Rust tests for the new path matching behavior.
  • Could not run cargo test in this local environment because Cargo is not installed here (spawnSync cargo ENOENT).

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