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:
- same thing as Bear does (callback URLs) or
- 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.