Fenced code blocks does not check for backticks #88

Closed
opened 2022-10-27 21:37:45 +02:00 by susnux · 0 comments
susnux commented 2022-10-27 21:37:45 +02:00 (Migrated from github.com)

Fenced code blocks should check the content for any sequence of backticks, as CommonMark defines a code block to end with a sequence of backticks of at least the number it started.

Meaning this is perfectly valid markdown:

````
```
code
```
````

But currently prosemirror-markdown will serialize this:

<pre><code>
```
code
```
</code></pre>

to this markdown:

```
```
code
```
```

which is a code block followed by a paragraph "code" and a second code block.

Fenced code blocks should check the content for any sequence of backticks, as CommonMark defines a code block to end with a sequence of backticks of at least the number it started. Meaning this is perfectly valid markdown: `````md ```` ``` code ``` ```` ````` But currently `prosemirror-markdown` will serialize this: ````html <pre><code> ``` code ``` </code></pre> ```` to this markdown: ````md ``` ``` code ``` ``` ```` which is a code block followed by a paragraph "code" and a second code block.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
prosemirror/prosemirror-markdown#88
No description provided.