mirror of
https://github.com/zadam/trilium.git
synced 2025-11-16 10:15:52 +01:00
feat(markdown): use different approach for reference links
This commit is contained in:
@@ -64,17 +64,6 @@ class CustomMarkdownRenderer extends Renderer {
|
||||
return `<blockquote>${body}</blockquote>`;
|
||||
}
|
||||
|
||||
link(data: Tokens.Link): string {
|
||||
let html = super.link(data);
|
||||
|
||||
// Rewrite local/relative links back to reference links.
|
||||
if (data.href.indexOf("://") === -1) {
|
||||
html = html.replace(/^<a /, `<a class="reference-link" `);
|
||||
}
|
||||
|
||||
return html;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const renderer = new CustomMarkdownRenderer({ async: false });
|
||||
|
||||
Reference in New Issue
Block a user