Link labels aren’t properly rendered / handled. A link label is a link of the form [display text][label]
, where [label]
is given a destination later on in the document.
In the following markdown:
My link: [foo][bar]
[bar]: https://example.com
Should be rendered as
<p>My link: <a href="https://example.com">foo</a></p>
Steps to reproduce
Enter the following markdown into an obsidian document.
Link to report: [Jepsen Report][jepsen-report]. This [report][jepsen-report] contains detailed and useful information regarding redpanda.
[jepsen-report]: https://go.redpanda.com/hubfs/PDFs/Jepsen-Report-Redpanda-2022.pdf
This issue is reproducible in a sandbox vault.
Expected result
This creates two links, “Jepsen Report”, and “report”, with the link destination set to https://go.redpanda.com/hubfs/PDFs/Jepsen-Report-Redpanda-2022.pdf. In other words, the effect should be the same as the following:
Link to report: [Jepsen Report](https://go.redpanda.com/hubfs/PDFs/Jepsen-Report-Redpanda-2022.pdf). This [report](https://go.redpanda.com/hubfs/PDFs/Jepsen-Report-Redpanda-2022.pdf) contains detailed and useful information regarding redpanda.
The documentation for this feature in Github Flavored Markdown is given here: https://github.github.com/gfm/#link-label
Actual result
“Jepsen Report” is rendered like a link, but clicking on it opens a new document containing only a [
This behavior is unexpected and unusual.
Environment
SYSTEM INFO:
Obsidian version: v1.4.16
Installer version: v1.4.16
Operating system: Darwin Kernel Version 23.1.0: Mon Oct 9 21:28:45 PDT 2023; root:xnu-10002.41.9~6/RELEASE_ARM64_T6020 23.1.0
Login status: logged in
Catalyst license: none
Insider build toggle: off
Live preview: on
Legacy editor: off
Base theme: dark
Community theme: none
Snippets enabled: 0
Restricted mode: on
RECOMMENDATIONS:
none
Additional information
This is a common way I use of defining links, especially in documents I’ve imported into Obsidian, because it makes the markdown a lot more readable to use link labels.
The full reference spec for this feature in Github Markdown can be found here: https://github.github.com/gfm/#link-label