Header suggestions may point to a different note in relative path mode

Steps to reproduce

  1. I have a README.md in almost every folder in my vault, but for purposes of reproducing 2 should be enough, 1 at the root & 1 elsewhere… both with an alias, to distinguish them (I have my settings for MD links with relative paths instead of wikilinks, for compatibility with VSCode)
  2. in a file that’s in the same folder as the non-root README… inside [[]] type the alias for the one that’s NOT at the root, select it and press #

Expected result

when the list of headings shows up, it’s should be the headings from the selected file in the same folder

Actual result

when the list of headings shows up, it’s actually the headings for the root README instead of the selected one

Environment

  • Operating system:
  • Debug info:
    SYSTEM INFO:
    Obsidian version: v0.13.23
    Installer version: v0.13.23
    Operating system: Windows 10 Home 10.0.22000
    Login status: logged in
    Catalyst license: none
    Insider build toggle: off
    Live preview: off
    Legacy editor: off
    Base theme: dark
    Community theme: none
    Snippets enabled: 1
    Safe mode: off
    Plugins installed: 6
    Plugins enabled: 6
    1: Dataview
    2: Calendar
    3: Tag Wrangler
    4: obsidian markmind
    5: Quick Latex for Obsidian
    6: Dangling links

RECOMMENDATIONS:
Custom theme: for cosmetic issues, please first try updating your theme to latest. If still not fixed, please try to make the issue happen in the help vault or disable community theme and snippets.
Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the help vault or disable community plugins.


Additional information

for files in other folders, it works correctly because the relative path isn’t ./ and therefore isn’t omitted (I might be in the minority, but I’d prefer if it DID render the ./ at the beginning of the path, because I style internal links a different color with a[href^="."], a[href^="#"])

thanks

Related to: