[[Note#Header]] or [[Note^Paragraph]] syntax should be compatible with aliases

Steps to reproduce

  1. Create a note named Note
  2. Create an alias “Alias” and a header in the page Note :
---
aliases : Alias
---
# Header
  1. In another note, link to the alias and try to point to the header :
    You will normally end up with : [[Note#Header|Alias]]

  2. Switch to view mode

Expected result

I expect to see : Alias > Header

Actual result

I only see : Alias

Environment

  • Operating system: OSX 11.5.2
  • Obsidian version: v0.12.15

Additional information

The link only shows as Alias but rightly points to Header when I click on it

Why is this important for me ?
I work with a lot of texts having long titles.
I use alias to use their shortened names version (for instance Long Name → LN)
I would like to be able to refer to headers of these texts using short names, such as LN > 1.

Right now my only option is to go the other way around, and have my text named LN with an alias being “Long Name”. Weird !

1 Like

Ok, I understand you. I am not sure all users would like what you want. I am gonna move this for FR.

Quoting Licat.
there are definitely people who expect the alias to replace the entire display string so we can’t make the change to break this.
However what we could do is to generate it automatically and do [[Note#Header|Alias > Header]] instead.

I would be curious to see a use case for that ? In that case, seems like the alias is used as a proxy for the link, not for the note, right ?

It seems more logical to me to have a link alias syntax in that case, for instance [[Note#Header]](linkAlias) that would display as linkAlias and point to Note#Header, whereas the note alias would act just as the note name, so that [[Note#Header|Alias]] would display as Alias > Header and point to Note#Header.

Just my 2 cents of course :wink: