mirror of
https://github.com/zadam/trilium.git
synced 2026-01-18 04:24:23 +01:00
fix(export/markdown): type error due to blankReplacement signature change
This commit is contained in:
parent
aa01bc1457
commit
bfb6d975ff
@ -37,14 +37,14 @@ function toMarkdown(content: string) {
|
||||
headingStyle: "atx",
|
||||
bulletListMarker: "*",
|
||||
codeBlockStyle: "fenced",
|
||||
blankReplacement(content, node, options) {
|
||||
if (node.nodeName === "SECTION" && (node as HTMLElement).classList.contains("include-note")) {
|
||||
return (node as HTMLElement).outerHTML;
|
||||
blankReplacement(_content, node) {
|
||||
if (node.nodeName === "SECTION" && node.classList.contains("include-note")) {
|
||||
return node.outerHTML;
|
||||
}
|
||||
|
||||
// Original implementation as per https://github.com/mixmark-io/turndown/blob/master/src/turndown.js.
|
||||
return ("isBlock" in node && node.isBlock) ? '\n\n' : '';
|
||||
}
|
||||
},
|
||||
});
|
||||
// Filter is heavily based on: https://github.com/mixmark-io/turndown/issues/274#issuecomment-458730974
|
||||
instance.addRule("fencedCodeBlock", fencedCodeBlockFilter);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user