From bf83faa322d1742f5e823023df93da986e6ecbde Mon Sep 17 00:00:00 2001 From: PikachuEXE Date: Fri, 9 Feb 2024 11:26:28 +0800 Subject: [PATCH] ! Fix comment channel link display w/ local API (#4652) --- 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 9a7ec7acd..8a1df50fd 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]