From 60fbb2a9e43e389d1a9993c8da66f1ae19b5d11d Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 23 May 2026 16:49:30 +0200 Subject: [PATCH] Ensure linebreaks are respected --- shell/plugins/notifications/components/NotificationCard.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shell/plugins/notifications/components/NotificationCard.qml b/shell/plugins/notifications/components/NotificationCard.qml index afaf6785..adfabd21 100644 --- a/shell/plugins/notifications/components/NotificationCard.qml +++ b/shell/plugins/notifications/components/NotificationCard.qml @@ -47,6 +47,7 @@ Rectangle { source.indexOf("opera") >= 0 } readonly property string sanitizedBody: sanitizeBody(body) + readonly property string styledBody: sanitizedBody.replace(/\r\n|\r|\n/g, "
") readonly property color dimColor: Qt.darker(Color.notifications.text, 1.4) readonly property color bodyColor: Qt.darker(Color.notifications.text, 1.15) @@ -167,7 +168,7 @@ Rectangle { Layout.fillWidth: true Layout.topMargin: Style.space(2) visible: root.sanitizedBody.length > 0 - text: root.sanitizedBody + text: root.styledBody textFormat: Text.StyledText font.family: "Liberation Sans" color: root.bodyColor