-
-
Notifications
You must be signed in to change notification settings - Fork 196
Closed
Description
When we stream data (in my case from a chatbot) to the frontend and then parse the markdown using markdown-to-jsx if the chatbot starts outputting a code block the app would crash (only for HTML). This happens as:
Since we stream the responses from chatbot the chatbot starts the code with opening the code block and then starts writing its HTML but since the code block isn't closed markdown-to-jsx detects it as plain HTML and renders it inside a <p> tag which causes DOM errors as the <html> tag cannot be a child of the <p> tag.
I believe markdown-to-jsx should detect the starting of the code block and till the code block is not closed by '```' it should just detect the chars after the starting as the code.
willtpwise
Metadata
Metadata
Assignees
Labels
No labels