Don't break links in HTML comments

Use case or problem

My workflow involves rendering notes using Quarto. This requires me to put links to other notes between HTML comment tags (<!-- [[link]] -->) because I do not want them visible in rendered documents.

For some reason, links between these tags are not recognized as links by Obsidian.

Proposed solution

Treat links inside HTML tags (<!-- -->) just like links outside them. Obsidian currently breaks these links for which I see no reason.

Current workaround (optional)

There is a workaround to combine HTML links with the percentage comments like <!-- %% [[link]] %% -->. However, in this case Obsidian has a very bizarre behaviour: such links are clickable but not recognized as backlinks nor shown in graph view.

2 Likes

I hadn’t noticed the graph and backlink problems because I don’t use the graph and rarely use backlinks — thanks for pointing those out.