typora / typora-issues

Bugs, suggestions or free discussions about the minimal markdown editor — Typora
https://typora.io
1.53k stars 58 forks source link

newline(enter)+backspace in mathmode produces an empty mathmode line. (video provided) #4536

Closed raylv17 closed 3 years ago

raylv17 commented 3 years ago

Describe the bug In mathmode ($...$), if you write something, then press enter to get newline, then backspace to get back the previous line, it will produce it will erase whatever is written in the mathmode and create an empty $...$ mathmode line.

To Reproduce Steps to reproduce the behavior: 1) Write a line in mathmode $a+b+c$ 2) Insert a line break just before closing the mathmode $a+b+c $ 3) Backspace to bring the $ back to the same line 4) This is what results $$ An empty mathmode line.

Expected behavior It shouldn't erase the line, the expected behavior is: backspace should only erase the newline and not everything inside $...$.

Screenshots / Screencasts https://youtu.be/YPHRagjc51k

Sample Markdown File Please attach or send us hi@typora.io the sample md file that may reproduce this.

Desktop (please complete the following information):

Typora Version v0.11.0 (beta)

Additional context Add any other context about the problem here.

raylv17 commented 3 years ago

Yes, but not entirely.

4530 mostly focuses on the fact that the bug behaves this way specifically for the character "2", and not any other character.

abnerlee commented 3 years ago

should be fixed in 0.11.2