From 2e16ef4384e49c951dc8c53c0a74935485985f68 Mon Sep 17 00:00:00 2001
From: Samuel Newman <mozzius@protonmail.com>
Date: Thu, 17 Jul 2025 21:17:57 +0300
Subject: fix whitespace collapse (#8659)

---
 src/view/com/composer/text-input/TextInput.web.tsx | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'src/view/com/composer/text-input/TextInput.web.tsx')

diff --git a/src/view/com/composer/text-input/TextInput.web.tsx b/src/view/com/composer/text-input/TextInput.web.tsx
index 06ff9836c..d5db7bcb6 100644
--- a/src/view/com/composer/text-input/TextInput.web.tsx
+++ b/src/view/com/composer/text-input/TextInput.web.tsx
@@ -221,7 +221,9 @@ export const TextInput = React.forwardRef(function TextInputImpl(
           }
         },
       },
-      content: generateJSON(richtext.text.toString(), extensions),
+      content: generateJSON(richtext.text.toString(), extensions, {
+        preserveWhitespace: 'full',
+      }),
       autofocus: 'end',
       editable: true,
       injectCSS: true,
-- 
cgit 1.4.1

