From 85f7c868c1644430b03f16bbdc270e0e26e1ad96 Mon Sep 17 00:00:00 2001 From: Elena Torro Date: Wed, 26 Nov 2025 13:07:06 +0100 Subject: [PATCH] :bug: Always preserve new line paragraphs --- frontend/src/app/util/text/content/to_dom.cljs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/frontend/src/app/util/text/content/to_dom.cljs b/frontend/src/app/util/text/content/to_dom.cljs index a4c5c747bb..5087e4cd25 100644 --- a/frontend/src/app/util/text/content/to_dom.cljs +++ b/frontend/src/app/util/text/content/to_dom.cljs @@ -137,16 +137,15 @@ :style (get-paragraph-styles paragraph)} (mapv #(create-inline % paragraph) (:children paragraph)))) + (defn create-root [root] (let [root-styles (get-root-styles root) - paragraphs (get-in root [:children 0 :children]) - filtered-paragraphs (->> paragraphs - (map-indexed vector) - (mapv second))] + paragraphs (get-in root [:children 0 :children])] (create-element "div" {:id (or (:key root) (create-random-key)) :data {:itype "root"} :style root-styles} - (mapv create-paragraph filtered-paragraphs)))) + ;; Always preserve all paragraphs, including empty ones + (mapv create-paragraph paragraphs))))