diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2026-03-12 22:34:16 +1100 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2026-03-12 22:34:16 +1100 |
| commit | 8e7ce4c6a64f53d262835af5f770e625e9bca9e7 (patch) | |
| tree | cdb3d9aa65d4b6fbade0893593514b7ecf9f2e14 /modules | |
| parent | hyprextras: avoid arg() overhead in applyOptions string building (diff) | |
| download | caelestia-shell-8e7ce4c6a64f53d262835af5f770e625e9bca9e7.tar.gz caelestia-shell-8e7ce4c6a64f53d262835af5f770e625e9bca9e7.tar.bz2 caelestia-shell-8e7ce4c6a64f53d262835af5f770e625e9bca9e7.zip | |
notifs: skip markdown parsing for plain text bodies
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/notifications/Notification.qml | 5 |
1 files changed, 3 insertions, 2 deletions
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 |