In certain situations when I paste a line of text containing inline equations, edits to the text cause the equation(s) to disappear.
Steps to reproduce
- Make sure obsidian is not in source mode
- Copy and paste the following string: “a$2$ b”
- [Enter] to next line.
- Move the cursor to the start of the first line and press [enter] to add a new line above.
- Move to the line above (now the first list item) and paste the same text
- Press the spacebar (or add any other character)
Did you follow the troubleshooting guide? Yes
Expected result
- a$2$ b
- a$2$ b
Actual result
- a b
- a$2$ b
Environment
SYSTEM INFO:
Obsidian version: v1.9.14
Installer version: v1.8.10
Operating system: Darwin Kernel Version 23.3.0: Wed Dec 20 21:30:27 PST 2023; root:xnu-10002.81.5~7/RELEASE_ARM64_T8103 23.3.0
Login status: logged in
Language: en
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
As far as I can tell this only occurs when
- the text is pasted (it doesn’t happen when I type the exact same text).
- the edit is at least one character outside an inline equation (so the equation “source” is never shown with the $). But if there are multiple inline equations, editing one will make the other(s) disappear.
- obsidian is not in source mode (inline equations are rendered).
Other things:
- It’s most consistent when the pasted text is identical to the text on the next line (sometimes it seems to occur even when this isn’t the case).
- It doesn’t always remove all of the equations.