[Bear 2.0 Version 2.0 (9652)] Some thoughts about links to headers

Both Bear 1.0 and Bear 2.0 use wikilinks to link between notes but they use callback URLs to link to headers. My main problem with the current solution is that some links are exported as normal text that doesn’t lead back to Bear (wikilinks) while others are exported as Bear links. I feel this is inconsistent, so I decided to look how other apps do it.

It seems that all other Markdown apps that allow for linking to headers chose one of two solutions:

  1. same thing as Bear does (callback URLs) or
  2. Obsidian’s notation [[title#heading]] – this notation is now used by quite a few apps besides Obsidian (e.g., Taio).

I really like Obsidian’s notation here, and I was wondering if we couldn’t adopt it in Bear – either in the app itself or at least in the Markdown export.

One thing I realize would make this less elegant is the decision to allow for tags in headings (and note titles) – but hashtags are unlikely to occur organically between text so maybe it could work?

And another thing this research made me realize is that using any hashtags in note titles will make resulting wikilinks unparsable for many Markdown apps: e.g., Obsidian states outright that links will not work for any file containing that character in its name. I wonder if we should worry about it at all in terms of Markdown exports of Bear notes.

Curious to hear the team’s thoughts.

1 Like

You can use [[title/header]].

This doesn’t work in Bear 2.

Yes, I just realised that. Seems to be a bug.

Edit: Actually the developer answered it here

Matteo mentioned that it is still not implemented. See here!

gnome.irdian, did you use the “copy link to header” feature? I also expected to see a wiki link rather than a link with callback-urls

Yes, I’m referring to “copy link to header”

Do you know if there is another way to find the id of a note?