Links in embedded files open incorrect files in Preview mode

Steps to reproduce

  1. Create the following structure:
Projects.md
Project Folder A
    Project name A.md
    Notes.md
Project Folder B
    Project name B.md
    Notes.md
  1. Add [[Project Folder A/Notes.md]] in Project name A.md file.
  2. Embed Project Name A.md into Projects.md via ![[Project Folder A/Project name A.md]]
  3. Enter Preview Mode

Expected result

Following the link to Notes in embedded block opens Project Folder A/Notes.md

Actual result

Following the link to Notes in embedded block opens Project Folder B/Notes.md

Environment

  • Operating system: MacOS Mojave 10.14.6
  • Obsidian version: 0.6.4
  • Using custom CSS: Yes

Additional information

I am using similar structure across projects and accumulated many files named “Notes” that sit in different project folders. The link to [[Notes]] works fine in the file (direct parent) I include it, but gives unexpected results when I embed the file (the parent) with such a link in another file.

In Project Name A.md
is the link in this form [[Project Folder A/Notes]] or in this form [[Notes]]

I can see something like that happening. There is still a lot of work to do proper handle references. Thanks for the report!