From 82e3d0a41a96c2d2fed817edf355119946d7bfec Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Valenta?= <tomas@imaniti.org>
Date: Mon, 26 Feb 2024 17:18:50 +0100
Subject: [PATCH] respect Markdown line breaks

---
 static_src/base.css                     | 4 ++++
 ucebnice/templates/admin/base_site.html | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/static_src/base.css b/static_src/base.css
index 69bf689..c018909 100644
--- a/static_src/base.css
+++ b/static_src/base.css
@@ -8,3 +8,7 @@
         font-family: "Roboto Condensed", system-ui, sans-serif;
     }
 }
+
+.prose :where(p):not(:where([class~="not-prose"] *)) {
+    @apply whitespace-pre-line
+}
diff --git a/ucebnice/templates/admin/base_site.html b/ucebnice/templates/admin/base_site.html
index 420c068..f3c9935 100644
--- a/ucebnice/templates/admin/base_site.html
+++ b/ucebnice/templates/admin/base_site.html
@@ -77,6 +77,10 @@
     .module caption, .inline-group h2 {
         text-transform: none;
     }
+
+    .markdownx-preview p {
+        white-space: pre-line
+    }
 </style>
 {% endblock %}
 
-- 
GitLab