Renaming an local image destroys note if image is used inside a callout

Steps to reproduce

  1. Open a new Sandbox vault

  2. In settings: Files and Links, turn on Automatically update internal links

  3. Create a new folder named bug at the vault root and copy the contents for the attached zip file into it. The folder structure should now look like this:

     Sandbox
      ╰-- bug
            ├-- assets
            │       ╰--  aaa.jpg
            ╰-- Image rename in Callout.md
    

    The content of the markdown file looks like so

    Some text before the callout
    > [!NOTE] Title
    > Contents
    > ![[aaa.jpg]]
    
    Some text after the callout
    
  4. In the Obsidian file explorer rename the image aaa.jpg to bbb.jpg

Did you follow the troubleshooting guide? [Y]

Expected result

After renaming the markdown file should look like this:

Some text before the callout
> [!NOTE] Title
> Contents
> ![[bbb.jpg]]

Some text after the callout

Actual result

Some text before the callout
> [!NOTE] Title
> Contents
> ![[aaa.jpg]]
[](bbb.jpg)fter the callout

:exclamation: The text after the callout is now corrupted

Environment

SYSTEM INFO:
	Obsidian version: v1.6.3
	Installer version: v1.6.3
	Operating system: Windows 10 Pro 10.0.22621
	Login status: not logged in
	Insider build toggle: off
	Live preview: on
	Base theme: adapt to system
	Community theme: none
	Snippets enabled: 0
	Restricted mode: on

RECOMMENDATIONS:
	none

Additional information

Image rename in Callout.zip (12.9 KB)

Thanks, Did you attempt to search before posting?

Duplicate of