diff --git a/static_src/base.css b/static_src/base.css
index 69bf689c9a603b9a6420d042e7c57233aa7ae9f7..c0189098ff6ecf70df9ee295c0a5db68d5ec019a 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 420c0688373060d393c0e51d53a5f183abe1bd85..f3c9935e36e6956a6f034965d88324c9be0e1f73 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 %}