Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code block declaration is not same as GitHub Markdown #795

Open
yousefmarey12 opened this issue Jan 9, 2025 · 0 comments
Open

Code block declaration is not same as GitHub Markdown #795

yousefmarey12 opened this issue Jan 9, 2025 · 0 comments

Comments

@yousefmarey12
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant