|
|
|
@ -34,6 +34,11 @@ class CustomMarkdownRenderer extends Renderer {
|
|
|
|
return super.listitem(item).trimEnd();
|
|
|
|
return super.listitem(item).trimEnd();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
image(token: Tokens.Image): string {
|
|
|
|
|
|
|
|
return super.image(token)
|
|
|
|
|
|
|
|
.replace(` alt=""`, "");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
blockquote({ tokens }: Tokens.Blockquote): string {
|
|
|
|
blockquote({ tokens }: Tokens.Blockquote): string {
|
|
|
|
const body = renderer.parser.parse(tokens);
|
|
|
|
const body = renderer.parser.parse(tokens);
|
|
|
|
|
|
|
|
|
|
|
|
@ -72,6 +77,9 @@ function renderToHtml(content: string, title: string) {
|
|
|
|
html = importUtils.handleH1(html, title);
|
|
|
|
html = importUtils.handleH1(html, title);
|
|
|
|
html = htmlSanitizer.sanitize(html);
|
|
|
|
html = htmlSanitizer.sanitize(html);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Remove slash for self-closing tags to match CKEditor's approach.
|
|
|
|
|
|
|
|
html = html.replace(/<(\w+)([^>]*)\s+\/>/g, "<$1$2>");
|
|
|
|
|
|
|
|
|
|
|
|
return html;
|
|
|
|
return html;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|