diff --git a/core/lib/utils/html/html_utils.dart b/core/lib/utils/html/html_utils.dart
index 6ac8ab997..b156ed862 100644
--- a/core/lib/utils/html/html_utils.dart
+++ b/core/lib/utils/html/html_utils.dart
@@ -172,6 +172,11 @@ class HtmlUtils {
scrollbar-width: none; /* Firefox */
}
''' : ''}
+
+ pre {
+ white-space: pre-wrap;
+ }
+
${styleCSS ?? ''}