Live preview: selecting across line break then typing removes all following formatting and math

Steps to reproduce

Copy the following Markdown into any file

another word $math$ *italics* **bold** ==highlight== [[link]]
yet another $math$ *italics* **bold** ==highlight== [[link]]

then select the portion from the start of the first line to “another” in the second line, and then type any letter.


  • I don’t think it’s not crucial that you type a letter specifically, but the bug does not occur if you first press the enter key or the backspace key instead.
  • Seems related to Live-Preview: problems with text selection across multiple list items but that one was allegedly fixed? I indeed do not get zero-width spaces, but the links are not preserved, so doesn’t seem fixed to me.

Did you follow the troubleshooting guide? Yes, and this was reproduced in the sandbox vault.

Expected result

The selected text gets replaced by the newly typed content, and the formatting of the rest of the document is preserved.

Actual result

Any formatting in the remainder of the second line is dropped, links become plaintext, and (more distressingly) any inline LaTeX equations disappear completely.


	Obsidian version: v1.5.12
	Installer version: v1.4.13
	Operating system: Darwin Kernel Version 23.4.0: Fri Mar 15 00:12:41 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T8103 23.4.0
	Login status: logged in
	Catalyst license: none
	Insider build toggle: off
	Live preview: on
	Base theme: adapt to system
	Community theme: none
	Snippets enabled: 0
	Restricted mode: on


Additional information


Thanks a lot for your work, I’m a huge Obsidian fan! :slight_smile:

Thanks, I think it’s related to this. I will merge them

1 Like

A post was merged into an existing topic: Formatting stripped when selecting multiple lines and typing