react-textarea-code-editor
react-textarea-code-editor copied to clipboard
Markdown html code blocks break
Hey :)
When using markdown as language and typing something like this:
\```html
<div />
\```
(without the backslash)
The < character will be replaced by <.
E.g. in the demo:
My guess was that this bit of code is at fault: https://github.com/uiwjs/react-textarea-code-editor/blob/f8280760e58ec7a1af16f81880499d5a5762e5f1/core/src/utils.ts#L14C1-L19C7
But unfortunately, I can't figure out why it needs to be escaped twice and didn't feel comfortable with raising a PR about it, in fear of breaking something else. 😅