From 5868dbd76d4e516dc28e4a257728d103968e8074 Mon Sep 17 00:00:00 2001 From: MathMan05 Date: Thu, 16 Oct 2025 10:41:04 -0500 Subject: [PATCH] no more double enters :3 --- src/webpage/markdown.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/webpage/markdown.ts b/src/webpage/markdown.ts index 2efe631..c1d9f1f 100644 --- a/src/webpage/markdown.ts +++ b/src/webpage/markdown.ts @@ -177,7 +177,6 @@ class MarkDown { } if (keep) { element.append(keepys); - //span.appendChild(document.createElement("br")); } element.appendChild(this.markdown(build, {keep, stdsize})); span.append(element); @@ -277,7 +276,8 @@ class MarkDown { span.append(document.createElement("span")); } appendcurrent(); - span.append(document.createElement("br")); + + span.append(new Text("\n")); } continue; } @@ -1033,7 +1033,9 @@ class MarkDown { formatted = false; } let build = ""; - for (const thing of Array.from(element.childNodes)) { + const arr = Array.from(element.childNodes); + //debugger; + for (const thing of arr) { if (thing instanceof Text) { const text = thing.textContent; build += text;