quantizor / markdown-to-jsx

🏭 The most lightweight, customizable React markdown component.
https://markdown-to-jsx.quantizor.dev/
MIT License
2.01k stars 174 forks source link

Bug if code block is not closed #516

Open hzoou opened 1 year ago

hzoou commented 1 year ago

Even if the code block wasn't closed, I expected there would be a code block as long as it opened.

스크린샷 2023-09-12 오후 3 05 24

but ... Unfortunately, it is exposed only in pure text. Can this bug be solved?

anshgoyalevil commented 1 year ago

Can't we just close the code block, since that's how it is supposed to work?

markedwards commented 2 months ago

@anshgoyalevil -- this is a serious issue if you are streaming a response and progressively rendering it via <Markdown>. While a code block is not yet terminated, it gets rendered directly as HTML in the DOM, breaking things (and probably potentially executing JS?).

Surely this should be considered a bug and should be fixed.