From d8bf55efb21189e3aeb276d1fc14ad11a444546a Mon Sep 17 00:00:00 2001 From: Wujiao233 Date: Mon, 28 Nov 2022 19:32:01 +0800 Subject: [PATCH] fix: shoutcut tag filter handle mutiple tags (#608) * fix: shoutcut tag filter handle mutiple tags * not edit parser --- web/src/helpers/filter.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/helpers/filter.ts b/web/src/helpers/filter.ts index 4d82aad6..4722e76d 100644 --- a/web/src/helpers/filter.ts +++ b/web/src/helpers/filter.ts @@ -156,7 +156,7 @@ export const checkShouldShowMemo = (memo: Memo, filter: Filter) => { if (type === "TAG") { let contained = true; const tagsSet = new Set(); - for (const t of Array.from(memo.content.match(TAG_REG) ?? [])) { + for (const t of Array.from(memo.content.match(new RegExp(TAG_REG, "g")) ?? [])) { const tag = t.replace(TAG_REG, "$1").trim(); const items = tag.split("/"); let temp = "";