<!-- Attention: please fill in the issue in the template format, including but not limited to: detailed description, reproduction steps, expected results, actual results, error screenshots (not required), Mark Text and operation system version. If an issue is marked as `more detail`, stating that the issue is opened and no content has been added after one week and will be closed, thanks for your cooperation. --> <!-- 注意:请按照 template 格式填写 issue,包括但不仅限于:详尽的描述、重现步骤、期望结果、实际结果、错误截图(非必须)、Mark Text 和 操作系统版本型号或版本号,如果一个 issue 被标记为 `more detail`,说明 issue 填写不完整,一周后仍未补充任何内容,将被关闭,谢谢合作 --> <!-- Please make sure your application version is up to date --> ### Description <!-- Description of the bug --> Length of code block's fences should be kept, but it is not. --- ````` ```` foo ```` ````` becomes ````` ``` foo ``` ````` , which means this exact issue's markdown code can't be handled by marktext correctly :p - [x] Can you reproduce the issue? <!-- no: `[ ]` or yes: `[x]` --> ### Steps to reproduce 1. On non source code mode, insert <code>````</code> to create a fenced code block, type <code>```</code> as its content 2. toggle source code mode on, and you will find that it becomes ```` ``` ``` ``` ```` **Expected behavior:** <!-- What you expected to happen --> The length of the code block's fences should not be changed **Actual behavior:** <!-- What actually happened --> The length of code block's fences become 3 **Link to an example: [optional]** This is what happens when I toggle `Source Code Mode` multiple times:  <!-- If you're reporting a bug that's not reproducible, or it's hard to description, please paste a screenshot of reproducing this issue - gif format is appropriate --> ### Versions - Mark Text: v0.15.1 - Operating system: macOS 10.14.4
Activity
Jocs commentedon Dec 26, 2019
@Purstal Thanks for reporting this issue, we'll fix it in next versions.
Purstal commentedon Dec 27, 2019
@Jocs Thanks for your hard work
fix(muya): preserve code fence length on serialize (#4755)