Skip to content

Commit

Permalink
fix(TagNote): 🐛 Add # in fewer cases
Browse files Browse the repository at this point in the history
  • Loading branch information
SkepticMystic committed Jan 6, 2022
1 parent b6593d1 commit 261f001
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1083,7 +1083,10 @@ export default class BCPlugin extends Plugin {
...(tags?.map((t) => t.tag.slice(1)) ?? []),
...[...(frontmatter?.tags ?? [])].flat(),
...[...(frontmatter?.tag ?? [])].flat(),
].map((t: string) => (withHash ? "#" : "") + t.toLowerCase());
].map(
(t: string) =>
(!t.startsWith("#") && withHash ? "#" : "") + t.toLowerCase()
);
};

addTagNotesToGraph(
Expand Down

0 comments on commit 261f001

Please sign in to comment.