typora / typora-issues

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

Zero-width space in code block fences #4493

Closed Lakitna closed 3 years ago

Lakitna commented 3 years ago

Describe the bug

Typora inserts zero-width spaces in nested code block fences. This breaks my Markdown tooling downstream. Zero-width spaces are represented by red dots in this image:

image

To Reproduce

Create a nested code block outside of source code mode. That's it.

Expected behavior

Typora creates the following source code:

````
```
hello
```
````

This is proper Markdown in all tooling I've used so far, including here on Github :) Though Typora is not able to render it properly:

image

Alternative solution:

Typora creates the following source code:

~~~

hello

~~~

This does render as expected:

image

Sample Markdown File

As above

Desktop (please complete the following information):

Typora Version 0.10.11 (beta)

Additional context

Might be related to #403

abnerlee commented 3 years ago

3110

abnerlee commented 3 years ago

should be fixed

Lakitna commented 3 years ago

Confirmed that it's fixed :) Thank you!