Open
Description
For instance, this (from Notion, codeblock in a toggle) breaks the render very badly:
The culprit is here (the blocks html parser):
_mixedHTML(mixedHtml: string) {
return mixedHtml.replaceAll(/[^<>]+?(?=<\/)/g, (match) => {
// Must trim or Marked classifies text preceded by tabs as indented code.
const tokens = marked.lexer(_.trim(match), this.markedOptions)
return marked.parser(tokens, this.markedOptions)
})
We could fix our regex or add a condition to avoid anything inside of a set of double quotes. This wouldn't be mixed html, but would just be a string representation.