From 408687df9b757ad1c294866919ad11387d56c251 Mon Sep 17 00:00:00 2001 From: PikachuEXE Date: Thu, 8 Feb 2024 15:42:06 +0800 Subject: [PATCH] ! Fix comment channel link display w/ local API --- src/renderer/helpers/api/local.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/helpers/api/local.js b/src/renderer/helpers/api/local.js index 9a7ec7acd98a0..8a1df50fd3a53 100644 --- a/src/renderer/helpers/api/local.js +++ b/src/renderer/helpers/api/local.js @@ -742,7 +742,7 @@ export function parseLocalTextRuns(runs, emojiSize = 16, options = { looseChanne case 'WEB_PAGE_TYPE_CHANNEL': { const trimmedText = text.trim() // In comments, mention can be `@Channel Name` (not handle, but name) - if (CHANNEL_HANDLE_REGEX.test(trimmedText) || (options.looseChannelNameDetection && trimmedText.startsWith('@'))) { + if (CHANNEL_HANDLE_REGEX.test(trimmedText) || options.looseChannelNameDetection) { // Note that in regex `\s` must be used since the text contain non-default space (the half-width space char when we press spacebar) const spacesBefore = (spacesBeforeRegex.exec(text) || [''])[0] const spacesAfter = (spacesAfterRegex.exec(text) || [''])[0]