import marked from "marked"; import morphdom from "morphdom"; import DOMPurify from 'dompurify'; /** * Renders markdown content in the given container. */ class Markdown { constructor(container, content) { this.container = container; this.content = content; this.__render(); } setContent(content) { this.content = content; this.__render(); } __render() { const html = this.__getHtml(); // Wrap the HTML in another element, so that we // can use morphdom's childrenOnly option. const wrappedHtml = `