[android] Removing newline before a leading space removes paired syntax on the line

Steps to reproduce

Using Android:

  1. Create a new vault
  2. Create a new note
  3. Ensure you’re using Live Preview and enter:
lorem
 [[linksum]]

Note the leading space after the list, this is necessary to reproduce

  1. Position the cursor at the very start of the second line, before the leading space
  2. Press backspace

I (And OnkelTem on discord, who originally discovered it) see the square bracket removed from the link. It does not trigger in source mode.

I tested other syntax:

Unaffected:

  • Markdown links []()
  • Parentheses
  • Single square brackets
  • HTML (<span>word</span>)

Affected:

  • Italics
  • Bold
  • Mathjax ($4^3$)
  • Inline code

Disabling autopairing did not fix the issue. Two links on the same line are both stripped.

Did you follow the troubleshooting guide? Yes

Expected result

lorem
 [[linksum]]

Actual result

lorem [[linksum]]

Environment

SYSTEM INFO:
	Operating system: android 10 (OPPO CPH1877)
	Obsidian version: 1.4.6 (105)
	API version: v1.3.3
	Login status: logged in
	Catalyst license: none
	Live preview: on
	Legacy editor: off
	Base theme: dark
	Community theme: none
	Snippets enabled: 0
	Restricted mode: on

RECOMMENDATIONS:
	none

My framing makes it sound pretty niche but it’s actually pretty easy to trigger by accident, especially when editing lists.

P.S. I have a minor error there where I say “after the list”, I originally typed this up because I thought it was list-specific, but realised it worked with paragraphs too.

thank you

1 Like

Steps to reproduce

  1. Create a file with something to link to in it. E.g. a header.
  2. Create another file and create a link in this file to the first file using hard brackets ([[MainFile#myHeader]])
  3. Be in Edit view but not in Source view
  4. Put your cursor at the beginning of the line with the link and hit backspace.
  5. The link disappears - ta-da!

Did you follow the troubleshooting guide? [Y/N]

Yes

Expected result

The line, with link and all, should just be moved one line up.

Actual result

The line is moved one line up but the link is transformed to plain text. Not a link anymore.

Environment

SYSTEM INFO:
Operating system: android 13 (samsung SM-S901B)
Obsidian version: 1.4.9 (108)
API version: v1.3.7
Login status: not logged in
Live preview: on
Legacy editor: off
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none


Additional information

Screen_Recordin-1694085536147

1 Like

I also just experienced this issue with a fresh vault and no core/community plugins enabled on Android. Pressing backspace will also remove any styling like bold, italic, etc.

Thanks I’ll double check.

Has this started to happen recently?