Formatting is stripped when selecting multiple lines and typing

Steps to reproduce

  1. Type ‘Test’ on one line. Newline. Add a bullet. Add Type ‘Testing [[Link]]’
  2. Select the bullet and the newline, so that the cursor winds up after the ‘t’ in Test
  3. Press spacebar

Did you follow the troubleshooting guide? Y

Expected result

A single line that contains ‘Test Testing [[Link]]’

Actual result

A single line that contains ‘Test Testing Link’

This method works on other formatting as well such as monospace

Environment

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

RECOMMENDATIONS:
none


Additional information

This problem has been around for a long time and I’ve occasionally had data loss because I didn’t notice the links and other formatting being stripped

Obsidian newline formatting stripped.mp4.zip (1021.4 KB)

2 Likes

Interesting! I’ve never noticed that before. Confirmed in Obsidian 1.5.12 on iOS 17.4.1. It works whether you select only the dash or also the space after it.

A workaround is to type Delete instead of Space. If you select only the dash (or asterisk or plus) you won’t have to add a space.

1 Like

thanks

Steps to reproduce

Copy the following Markdown into any file

word
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.

Notes:

  • 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.

Environment

SYSTEM INFO:
	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

RECOMMENDATIONS:
	none

Additional information

ezgif-3-7f906a4301

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

Renamed this thread and added
Minimal example

Obsidian_u2fb2AWm2M