Updating wikilinks inside a custom title callout creates an empty markdown link in the middle of the callout

Once you’ve done the above, delete everything above this line.

Steps to reproduce

  1. Open sandbox vault
  2. Create a new note
  3. Add a callout with a custom title and a wikilink. I added a line above it to show that it also gets copied, but it works with just the callout:
Test123
> [!tip] Test
> [[Start Here]]
  1. Move the linked note (“Start Here” in this case), accept when it asks about updating links

Did you follow the troubleshooting guide? [Y/N]

Yes

Expected result

Nothing should change, the callout/note should look the same.

Actual result

Varies depending on the callout used. Apart from just updating the wikilink, it inserts an unnamed markdown link to the same linked note. In the example above I get the same result as in my actual vault, it inserts this link in the middle of callout, while also copying parts of the note, messing up the whole thing:

Test123
> [!tip] Test
> [[Start Here]]
[](Start%20Here.md)Test123
> [!tip] Test
> [[Start Here]]

When I use a different callout, it instead puts the empty link above the callout.

Environment

Windows 11

SYSTEM INFO:

	Obsidian version: v1.6.3
	Installer version: v1.5.12
	Operating system: Windows 10 Pro 10.0.22631
	Login status: not logged in
	Insider build toggle: off
	Live preview: on
	Base theme: adapt to system
	Community theme: none
	Snippets enabled: 1
	Restricted mode: off
	Plugins installed: 5
	Plugins enabled: 5
		1: Templater v2.3.2
		2: Sheets Extended v1.2.10
		3: Image Converter v1.1.7
		4: Dataview v0.5.66
		5: Advanced Tables v0.21.0

RECOMMENDATIONS:
	Custom theme and snippets: for cosmetic issues, please first try updating your theme and disabling your snippets. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community theme and snippets.
	Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.

Additional information

At first I assumed it was a problem with custom callouts (with a CSS snippet, as mentioned in the system info), but it breaks on the default ones too. The name of the linked note in the example contains a space, but it doesn’t matter either. I’m fairly certain this bug was introduced in 1.6.x, as I was doing this previously just fine.

See also