From 5b235c1f418ced308f9c81a00a446f7745ec4cdf Mon Sep 17 00:00:00 2001 From: Jonathan Staab Date: Wed, 7 Jun 2023 18:47:46 -0700 Subject: [PATCH] Fix formatting in contenteditable --- src/partials/ContentEditable.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/partials/ContentEditable.svelte b/src/partials/ContentEditable.svelte index 9db8f8de..b43fb48a 100644 --- a/src/partials/ContentEditable.svelte +++ b/src/partials/ContentEditable.svelte @@ -60,7 +60,7 @@ content += "\n" } - if (child.tagName === "DIV" && child.children[0]?.tagName === "BR") { + if (child.tagName === "DIV" && !child.querySelector("br")) { content += "\n" }