Auto completion of linked heading of the same name

Steps to reproduce

  • Create a new note in the sandbox vault with the following content:
## a
### b
text b
### c
first text c
### a
#### c
second text c
#### d
## test area
  • Ponder on your poorly chosen text headings for a little while, before trying to do a autocomplete embedding link to the second c heading, by typing [[#c and selecting the H4 variant (leading to the completion: [[#c]]:
  • Be surprised that it’ll link to the first occurrence instead, and try another time doing: ![[#a#c selecting the H4 variant, and see the same happen (leading to the completion: [[#a#c]])
  • Finally doing ![[#a#a#c]] you’re able to link to the correct variant

Expected result

I wanted it to actually link to the header I chose in the auto complete instead of the first occurrence of that header. In other words, I would like for it to identify that this header had similar names, and that there was a way to uniquely identify the one I chose and use that.

Also if you’ve got multiple identical headings, the auto complete doesn’t show you the sub headings of the second variant, only for the first variant, if that makes sense?

Actual result

It chose the first available occurrence in all cases, and the resulting document in the test area was:




With the display of:

	Obsidian version: v1.5.3
	Installer version: v1.5.3
	Operating system: Darwin Kernel Version 18.7.0: Tue Jun 22 19:37:08 PDT 2021; root:xnu-4903.278.70~1/RELEASE_X86_64 18.7.0
	Login status: not logged in
	Insider build toggle: off
	Live preview: on
	Base theme: adapt to system
	Community theme: none
	Snippets enabled: 0
	Restricted mode: on

1 Like

This is an undocumented and incomplete feature.

You should search/open a FR about it

1 Like

How is it not a bug when you select an entry in the auto complete list, and it fails to give you that item?

We do not currently support linking to to headings with the same name. You found an undocumented and incomplete feature.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.