Support Reference Links in Edit mode/Live Preview (reference-style)

Would like to add another vote for fixing Obsidians handling of reference links.

As a nvim user markdown reference links are a life-saver due to vim/nvim’s decades long issues with text concealment.

The issue with reference links not working in Edit Mode could be tolerable when using Obsidian mostly for viewing notes and occasionally editing them on a mobile .

But the issue with internal reference links being treated as external links completely breaks down all internal link usage in my vault.

1 Like

Reference style links are a major feature of Markdown and make source text more readable. I expect they’re less commonly used because inline links are simpler, and less commonly well-supported by apps for the same reason, but it’s still kind of upsetting that they’re so broken here.

4 Likes

@CawlinTeffid I feel the same but… s/kind of/extremely/

Still happens in v1.6.1 on Windows
The reference links are not listed in the user documentation, but are part of the Common Mark spec (Basic Syntax | Markdown Guide)

To summarize, there is full support of reference links in preview mode, even with advanced features

This displays perfectly:

[Libération, with a reference link][2]
[2]: http://www.liberation.fr "journal libération"

But in source edit the command “follow link under cursor” does not work

  • if the cursor is in the link text, it opens/creates a note named [ in the default folder for new notes
  • if the cursor is the link destination, it opens/creates a note named 2 in the default folder

This is really appears as bug to me, because :

  • the second part of the reference link, starting with [2]: is properly formatted in edit view, and perfectly functional in preview (even with the optional title)
  • if reference links were not supported, this notation should not be recognised as a link at all, and the command “follow link under cursor” should not be available.
  • although it is an external link, Obsidian behaves like it is internal and opens/creates a note

The problem is that it makes reference links nearly impossible to use.

Thanks a lot for you amazing work

2 Likes

This is so old I forgot it had been opened a few times already. Is this any closer to getting fixed after 2 1/2 years?