From 0000f053958c9144108bb78e159d14b3c7da9923 Mon Sep 17 00:00:00 2001
From: Fadi SHEHADEH <fadi.shehadeh@savoirfairelinux.com>
Date: Fri, 6 May 2022 13:56:10 -0400
Subject: [PATCH] chatview: interpret messages as markdown instead of html

GitLab: #728

Change-Id: If6896c2de4ed56c6f0351057e97fd9f2224dfd6e
---
 src/commoncomponents/TextMessageDelegate.qml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/commoncomponents/TextMessageDelegate.qml b/src/commoncomponents/TextMessageDelegate.qml
index 09bf13790..1dca5666d 100644
--- a/src/commoncomponents/TextMessageDelegate.qml
+++ b/src/commoncomponents/TextMessageDelegate.qml
@@ -42,7 +42,7 @@ SBSMessageBase {
         TextEdit {
             padding: 10
             anchors.right: isOutgoing ? parent.right : undefined
-            text: '<span style="white-space: pre-wrap">' + Body + '</span>'
+            text: Body
             width: {
                 if (extraContent.active)
                     Math.max(extraContent.width,
@@ -57,7 +57,7 @@ SBSMessageBase {
             font.pointSize: 11
             font.hintingPreference: Font.PreferNoHinting
             renderType: Text.NativeRendering
-            textFormat: TextEdit.RichText
+            textFormat: Text.MarkdownText
             onLinkHovered: root.hoveredLink = hoveredLink
             onLinkActivated: Qt.openUrlExternally(hoveredLink)
             readOnly: true
-- 
GitLab