Inline code with < characters does not parse correctly (html inside inline code) #103

Closed
opened 2023-07-19 21:34:19 +02:00 by remorses · 2 comments
remorses commented 2023-07-19 21:34:19 +02:00 (Migrated from github.com)

serializing this markdown document

code `<p>`

generates the following markdown

code
serializing this markdown document ``` code `<p>` ``` generates the following markdown ``` code ```
marijnh commented 2023-07-19 21:57:24 +02:00 (Migrated from github.com)

The markdown-it library strips out HTML tags, probably because not doing so would open up a lot of usages to cross-site scripting. Since our parser (this is happening in the parser, not the serializer) uses that for tokenizing, they are stripped in our MarkdownParser as well. Whether that is a good idea I'm not entirely sure, but I don't see an easy way to tell MarkdownIt to treat HTML tags as plain text.

The markdown-it library strips out HTML tags, probably because not doing so would open up a lot of usages to cross-site scripting. Since our parser (this is happening in the parser, not the serializer) uses that for tokenizing, they are stripped in our `MarkdownParser` as well. Whether that is a good idea I'm not entirely sure, but I don't see an easy way to tell MarkdownIt to treat HTML tags as plain text.
remorses commented 2023-07-24 12:35:22 +02:00 (Migrated from github.com)

Sorry i must have messed up with my own code and thought the problem was in prosemirror-markdown, but only the testing library has this problem

Sorry i must have messed up with my own code and thought the problem was in [prosemirror-markdown](https://github.com/ProseMirror/prosemirror-markdown), but only the testing library has this problem
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#103
No description provided.