Skip to content

armgit / memos

Public Imported from GitHub
0

Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.

fix: shoutcut tag filter handle mutiple tags (#608)

Wujiao233d8bf55efb211
diff --git a/web/src/helpers/filter.ts b/web/src/helpers/filter.ts
index 4d82aad6a..4722e76dd 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<string>();
- 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 = "";