From 8e7ce4c6a64f53d262835af5f770e625e9bca9e7 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Thu, 12 Mar 2026 22:34:16 +1100 Subject: notifs: skip markdown parsing for plain text bodies --- modules/notifications/Notification.qml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'modules') diff --git a/modules/notifications/Notification.qml b/modules/notifications/Notification.qml index 1e8f8fe..728cd9f 100644 --- a/modules/notifications/Notification.qml +++ b/modules/notifications/Notification.qml @@ -17,6 +17,7 @@ StyledRect { required property Notifs.Notif modelData readonly property bool hasImage: modelData.image.length > 0 readonly property bool hasAppIcon: modelData.appIcon.length > 0 + readonly property int bodyTextFormat: /[<*_`#\[\]]/.test(modelData.body) ? Text.MarkdownText : Text.PlainText readonly property int nonAnimHeight: summary.implicitHeight + (root.expanded ? appName.height + body.height + actions.height + actions.anchors.topMargin : bodyPreview.height) + inner.anchors.margins * 2 property bool expanded: Config.notifs.openExpanded @@ -347,7 +348,7 @@ StyledRect { anchors.rightMargin: Appearance.spacing.small animate: true - textFormat: Text.MarkdownText + textFormat: root.bodyTextFormat text: bodyPreviewMetrics.elidedText color: Colours.palette.m3onSurfaceVariant font.pointSize: Appearance.font.size.small @@ -378,7 +379,7 @@ StyledRect { anchors.rightMargin: Appearance.spacing.small animate: true - textFormat: Text.MarkdownText + textFormat: root.bodyTextFormat text: root.modelData.body color: Colours.palette.m3onSurfaceVariant font.pointSize: Appearance.font.size.small -- cgit v1.2.3-freya