Skip to content

Code block declaration is not same as GitHub Markdown #795

Description

@yousefmarey12

Hello,

I was working on a different open source repo with this particular issue. Basically what I noticed on common markdown processors is that whenever there is N ticks or tildes, there has to be N or more closing ticks or tildes`. From a brief look at code block functions

I noticed that the code only takes into consideration of exactly 3 backticks or tildes. I could be wrong, but I noticed on my side and on the issuer's side that there's a bug when one uses more than 3 ticks.

I couldn't find anything official regarding markdown specifications but what I noticed is that the only way to close a code block is with N or more backticks or tildes. With that said, what I expect to be is as follows:

N backticks (or tildes) should be enclosed with N or more backticks or (tildes). Backticks should not be showed in a UI, even if the number of enclosing backticks is greater than the number of opening backticks.

so

`````

```js

```

``````

The outer backticks will not be visible when parsed, but the inner backticks will be visible as 3 is less than 5.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions