Rename adds filename to self-relative internal links (#anchor to Name#anchor)

Steps to reproduce

  1. Create a file with an internal link to a heading or block in the same file (e.g. [[#Some Heading]])
  2. Rename the file

Expected result

Links should remain unchanged, so that link text is just the heading name

Actual result

File name is added to the links, changing how the text reads and is formatted. (E.g. a sentence like “the [Items for review] are below” becomes “the [Some File Name > Items for review] are below”.)

Environment

  • Operating system: Windows
  • Obsidian version: 0.11.13

Additional information

For those needing a workaround: rename the file while it’s open in an editor, then focus the editor and use undo to revert the changes (assuming you’re not using the file’s actual name anywhere on purpose).

A post was merged into an existing topic: Move/rename a note changes the internal links pointing to the same note