From c6fab0a1ca03f376e5efcb3a18ed94cf420afd43 Mon Sep 17 00:00:00 2001 From: quenousimporte <76260127+quenousimporte@users.noreply.github.com> Date: Sun, 5 Feb 2023 15:11:26 +0100 Subject: [PATCH] fixed: removed header before merge --- main.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index 74ce98d..494c1df 100644 --- a/main.js +++ b/main.js @@ -2255,7 +2255,13 @@ function withsubs() { kids.forEach(kid => { - tempnote.content = tempnote.content.replaceAll("[[" + kid.title + "]]", kid.content); + var kidcontent = kid.content; + if (kidcontent.startsWith("---\n")) + { + var pos = kidcontent.indexOf("---\n", 4); + kidcontent = kidcontent.substring(pos + 4); + } + tempnote.content = tempnote.content.replaceAll("[[" + kid.title + "]]", kidcontent); }); kids = children(tempnote); }