Skip to content

Length of code block's fences is not kept #1841

Closed

Description

@Purstal

Description

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

  • Can you reproduce the issue?

Steps to reproduce

  1. On non source code mode, insert ```` to create a fenced code block, type ``` as its content

  2. toggle source code mode on, and you will find that it becomes

    ```
    ```
    ```
    

Expected behavior:

The length of the code block's fences should not be changed

Actual behavior:

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:

2019-12-24 17 55 46

Versions

  • Mark Text: v0.15.1
  • Operating system: macOS 10.14.4

Activity

  1. Jocs commented on Dec 26, 2019

    @Jocs
    Member

    @Purstal Thanks for reporting this issue, we'll fix it in next versions.

  2. added
    🐛 bug
    on Dec 26, 2019
  3. Purstal commented on Dec 27, 2019

    @Purstal
    Author

    @Jocs Thanks for your hard work

  4. added a commit that references this issue on Jun 27, 2026
    45775ce
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐛 bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions