diff --git a/main.js b/main.js index 69dcc4cd..9436d107 100644 --- a/main.js +++ b/main.js @@ -51831,12 +51831,12 @@ class BCPlugin extends require$$0.Plugin { const { tags, frontmatter } = this.app.metadataCache.getFileCache(file); const allTags = []; tags === null || tags === void 0 ? void 0 : tags.forEach((t) => allTags.push(dropHash(t.tag))); - [(_a = frontmatter === null || frontmatter === void 0 ? void 0 : frontmatter.tags) !== null && _a !== void 0 ? _a : []] - .flat() - .forEach((t) => allTags.push(dropHash(t))); - [(_b = frontmatter === null || frontmatter === void 0 ? void 0 : frontmatter.tag) !== null && _b !== void 0 ? _b : []] - .flat() - .forEach((t) => allTags.push(dropHash(t))); + [(_a = frontmatter === null || frontmatter === void 0 ? void 0 : frontmatter.tags) !== null && _a !== void 0 ? _a : []].flat().forEach((t) => { + splitAndTrim(t).forEach((innerT) => allTags.push(dropHash(innerT))); + }); + [(_b = frontmatter === null || frontmatter === void 0 ? void 0 : frontmatter.tag) !== null && _b !== void 0 ? _b : []].flat().forEach((t) => { + splitAndTrim(t).forEach((innerT) => allTags.push(dropHash(innerT))); + }); return allTags.map((t) => (withHash ? "#" : "") + t.toLowerCase()); }; this.getTargetOrder = (frontms, target) => { diff --git a/src/main.ts b/src/main.ts index 1d9a9ede..4fc802f7 100644 --- a/src/main.ts +++ b/src/main.ts @@ -92,6 +92,7 @@ import { getRealnImplied, iterateHiers, makeWiki, + splitAndTrim, splitAtYaml, strToRegex, } from "./sharedFunctions"; @@ -1084,12 +1085,12 @@ export default class BCPlugin extends Plugin { tags?.forEach((t) => allTags.push(dropHash(t.tag))); - [frontmatter?.tags ?? []] - .flat() - .forEach((t: string) => allTags.push(dropHash(t))); - [frontmatter?.tag ?? []] - .flat() - .forEach((t: string) => allTags.push(dropHash(t))); + [frontmatter?.tags ?? []].flat().forEach((t: string) => { + splitAndTrim(t).forEach((innerT) => allTags.push(dropHash(innerT))); + }); + [frontmatter?.tag ?? []].flat().forEach((t: string) => { + splitAndTrim(t).forEach((innerT) => allTags.push(dropHash(innerT))); + }); return allTags.map((t) => (withHash ? "#" : "") + t.toLowerCase()); };