Add support for header ids

Hello, it would be great to have support for header ids, so that you can use the syntax to link to a header inside your notes, and also be compatible outside of Obsidian. Currently only the double bracket [[]] syntax works for doing this.

3 Likes

Hi! can you provide examples?

1 Like

What you mean exactly?

The help link in the help menu for the markdown syntax mentions header IDs as valid markdown syntax but these are not treated as such.

Hi @cristian ,
Probably @GeoffVDC was asking for an equivalent way to define the id of a heading like the one described in the markdown guide:

The syntax is

### My Great Heading {#custom-id}

and is equivalent to the HTML

<h3 id="custom-id">My Great Heading</h3>

Do you know if it is implemented into obsidian? Because that one it seems to not work for me.

Thank you!

I did not know this notation, thanks!.

I think Obsidian implements it using ^id

If in the note ‘Alice’ you have a heading

## Embedded Heading ^someId

you can reference it like:

[[Alice#^someId]]

While this is basically true, supporting the syntax provided with the links would make obsidian more compatible / importing other sources of markdown easier.

An example is pandoc. It converts ids for headings into the syntax described in the link above. Without implementing this FR you’d need to edit pandoc output manually, which is cumbersome.