From 15d7a2f021995bcc2306c6607fc00c96300d1298 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Sun, 22 Jan 2023 17:36:23 +0100 Subject: [PATCH] Make code tags preserve whitespace --- resources/qml/delegates/TextMessage.qml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/resources/qml/delegates/TextMessage.qml b/resources/qml/delegates/TextMessage.qml index bbb58736..156f6ad1 100644 --- a/resources/qml/delegates/TextMessage.qml +++ b/resources/qml/delegates/TextMessage.qml @@ -22,7 +22,8 @@ MatrixText { text: " - " + formatted.replace(/
/g, "
").replace(//g, "").replace(/<\/del>/g, "").replace(//g, "").replace(/<\/strike>/g, "")
+    " + formatted.replace(//g, "").replace(/<\/del>/g, "").replace(//g, "").replace(/<\/strike>/g, "")
     width: parent.width
     height: !keepFullText ? Math.round(Math.min(timelineView.height / 8, implicitHeight)) : implicitHeight
     clip: !keepFullText