mirror of
https://github.com/zadam/trilium.git
synced 2025-11-16 18:25:51 +01:00
fix(import/markdown): support wikilinks in other elements other than paragraphs
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user