Open AJamesPhillips opened 1 year ago
Useful investigation by Preact maintainer: https://github.com/preactjs/preact/issues/4083#issuecomment-1653337009
It looks like the markdown parser is materialising <s -> into a HTMLElement tag s with the attribute - == true. Preact only sees the final vnode and when it tries to render that the browser throws the error.
This errors with Preact but not React so I've posted a potential bug report with Preact. I'm also mentioning it here in case there's something on the Markdown-to-JSX side which is relevant to change as this might be a follow on from #180. I don't know.
Describe the bug Markdown-to-JSX can produce some output that causes Preact to throw an exception.
To Reproduce
https://codesandbox.io/s/upbeat-agnesi-mdh9js?file=/components/app.js
Steps to reproduce the behavior:
Error can also show up as "DOMException: String contains an invalid character"
Expected behavior Either not error or a way to catch and gracefully handle that error.