Link renaming fails if latex equations are not on separate lines

Steps to reproduce

  • Create a file
  • Create a file and insert the following into it:

  • Rename to anything
  • The link to in will not have updated

If you then insert a newline character between the two sets of $$ the link renaming will work as expected.

Weirdly though this doesn’t appear to be an issue for the interactive viewer as in it will display both equations fine

Did you follow the troubleshooting guide?

Y - Was able to replicate this bug in the sandbox

Expected result

I wanted the link to to be updated to the new name

Actual result

The Link to in was not updated


	Obsidian version: v1.4.14
	Installer version: v1.4.13
	Operating system: Darwin Kernel Version 22.4.0: Mon Mar  6 21:00:17 PST 2023; root:xnu-8796.101.5~3/RELEASE_X86_64 22.4.0
	Login status: logged in
	Catalyst license: none
	Insider build toggle: off
	Live preview: on
	Legacy editor: off
	Base theme: light
	Community theme: none
	Snippets enabled: 1
	Restricted mode: off
	Plugins installed: 5
	Plugins enabled: 0

Additional information

Linked file settings:

Just to add that it appears to be bugged if any text is added onto the end of the equation for example this triggers it as well:



This is particularly difficult to spot / deal with because in live preview mode as there is no clue that it is formatted like this: