fix(import/markdown): support wikilinks in other elements other than paragraphs

This commit is contained in:
Elian Doran
2025-06-20 21:00:39 +03:00
parent 4a40b22c9a
commit 8d90231f76
2 changed files with 13 additions and 3 deletions

View File

@@ -23,9 +23,7 @@ class CustomMarkdownRenderer extends Renderer {
}
override paragraph(data: Tokens.Paragraph): string {
let text = super.paragraph(data).trimEnd();
text = processWikiLinks(text);
return text;
return super.paragraph(data).trimEnd();
}
override code({ text, lang }: Tokens.Code): string {
@@ -117,6 +115,12 @@ class CustomMarkdownRenderer extends Renderer {
return `<blockquote>${body}</blockquote>`;
}
text(token: Tokens.Text | Tokens.Escape): string {
let text = super.text(token);
text = processWikiLinks(text);
return text;
}
}
function renderToHtml(content: string, title: string) {