Reference-style hyperlinks behave incorrectly in edit mode

Steps to reproduce

[Obsidian][1]
[Obsidian][abc]

[1]: https://obsidian.md/
[abc]: https://obsidian.md/

Expected result

Following the first link (reference-style link [1]) should direct me to https://obsidian.md/ in my web browser.

Following the second link (reference-style link [abc]) should also direct me there.

For example, Discourse (what this forum runs on) renders the above code properly:

Obsidian
Obsidian

Actual result

Following the first link directs me to a new note named [ (file name [.md). Following the second link directs me to a new note named abc (file name abc.md).

However, this bug only occurs in edit mode. In preview mode, the links work as expected. Additionally, the same bug occurs for reference-style image links (following ![alt text][id] creates a new Markdown file named id.md instead of following the hyperlink to which [id] refers).

Environment

The same behavior occurs on both Windows and iOS, both with and without live preview and legacy editor:

  • Operating system: Windows 10
  • Debug info:
SYSTEM INFO:
	Obsidian version: v0.14.6
	Installer version: v0.14.5
	Operating system: Windows 10 Pro 10.0.19044
	Login status: logged in
	Catalyst license: none
	Insider build toggle: off
	Live preview: off
	Legacy editor: off
	Base theme: light
	Community theme: none
	Snippets enabled: 0
	Safe mode: on

RECOMMENDATIONS:
	none
  • Operating system: iOS 15
  • Debug info:
SYSTEM INFO:
	Operating system: ios 15.4.1 (Apple iPhone)
	Login status: logged in
	Catalyst license: none
	Live preview: on
	Legacy editor: on
	Base theme: dark
	Community theme: none
	Snippets enabled: 0
	Safe mode: on

RECOMMENDATIONS:
	Update installer: installer version too low, please download from https://obsidian.md/download and reinstall.

Related issue:

[display text][id]

[id]: https://obsidian.md/ "Website Title"

is meant to produce something like:

display text

where hovering over the hyperlink shows “Website Title” under the mouse. Obsidian renders this properly in preview mode, but in edit mode (in addition to the above issue of creating id.md), the entire URL is treated as a hyperlink to https://obsidian.md/%20"Website%20Title" instead of https://obsidian.md/ with a title attribute.

Instead of:

image

image

one would expect the URL be separate from the “Website Title” text.

Did you search before posting?

I could have sworn I had, but I guess not. My bad. I think I found Markdown reference-style links unsupported (while in standard MD spec) and forgot to continue searching.

EDIT: I’m not seeing another exact duplicate of this, though. Are you referring to a specific post?

1 Like

Thank you. Apologies.

no problem.
I have just seen some many duplicates of this issue that I am surprised it doesn’t pop up in search sooner.