From 975c469e1a371b78d580174c3e0c948ad448f0c9 Mon Sep 17 00:00:00 2001 From: _xB <65196493+xBiei@users.noreply.github.com> Date: Fri, 13 Jun 2025 23:29:17 +0300 Subject: [PATCH] notifications: re-add support for HTML tags --- .../modules/common/widgets/NotificationItem.qml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.config/quickshell/modules/common/widgets/NotificationItem.qml b/.config/quickshell/modules/common/widgets/NotificationItem.qml index 33e901f62..47e7cdee2 100644 --- a/.config/quickshell/modules/common/widgets/NotificationItem.qml +++ b/.config/quickshell/modules/common/widgets/NotificationItem.qml @@ -41,13 +41,11 @@ Item { // Notification item area // Handle Brave/Chrome notifications - remove first line if (appName && appName.toLowerCase().includes('brave')) { const lines = body.split('\n\n') - if (lines.length > 1) { + if (lines.length > 1 && lines[0].startsWith(']*>/g, '') return processedBody } @@ -190,8 +188,7 @@ Item { // Notification item area elide: Text.ElideRight textFormat: Text.StyledText text: { - const processedBody = processNotificationBody(notificationObject.body, notificationObject.appName || notificationObject.summary) - return processedBody.replace(/img{max-width:${notificationBodyText.width}px;}` + - `${processedBody.replace(/\n/g, "
")}` + `${processNotificationBody(notificationObject.body, notificationObject.appName || notificationObject.summary).replace(/\n/g, "
")}` } onLinkActivated: (link) => {