In this note, create a header with a link: # Header linking to [[My note]]
Add a sub-header: ## Sub-header
Now, try to insert a link to the sub-header and use link completion (tab): [[My note#Header linking to My note#...]]
Did you follow the troubleshooting guide? [Y/N] Y
Expected result
Arguably, we want to be able to use auto-completion and access the sub-header.
Actual result
When there is a link in an intervening header (“Header linking to [[…]]”), the auto-completion of subsequent sub-headers breaks (Obsidian does not display “Sub-header”).
Environment
Environment
SYSTEM INFO:
Operating system: ios 18.4.1 (Apple iPhone14,2)
Obsidian version: 1.8.10 (197)
API version: v1.8.10
Login status: not logged in
Language: en
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on
Both of these have a correct syntax. In practice, they are generally ambiguous, though, because multiple sub-headers can have the same name, so these link forms don’t always work (case of a header entry that folllows a template). So it’s best to fully qualify sub-header paths (or you can get incorrect links).
You could then use a higher heading to specify the one you actually want, like in [[#heading c#heading a]] to get to the last appearance of “heading a”. You can’t use auto complete to find that though… And it does require for a somewhat proper heading structure in your document.
I really cannot say, but if this is a feature, it’s as useful as the existing auto-completion feature for sub-headers when no links are present in intervening headers (it does exactly the same thing, from a user point of view).
OK, it seems that I was a step behind. Sorry for the slow uptake. I thought it was a feature request to include sub-headers in autocompletion. I wasn’t aware that autocompletion already supported sub-headers.
So the bug report is about a special case of headings?
## Header plain text
### Sub-header
## Header with a [[wikilink]]
### Sub-header
Autocomplete works: [[My note#header p… [[My note#header plain text#… [[My note#header with a …
Autocomplete does not work: [[My note#header with a wikilink#…