From a7a5ed8f0a4d348f4f3b91be3a4fadeee3a78e22 Mon Sep 17 00:00:00 2001 From: Zef Hemel Date: Sat, 21 Jan 2023 14:06:37 +0100 Subject: [PATCH] Remove hashtag from index tag name, related to #322 --- plugs/core/tags.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugs/core/tags.ts b/plugs/core/tags.ts index 68c62a6..66f15af 100644 --- a/plugs/core/tags.ts +++ b/plugs/core/tags.ts @@ -1,5 +1,5 @@ import { collectNodesOfType } from "$sb/lib/tree.ts"; -import { editor, index } from "$sb/silverbullet-syscall/mod.ts"; +import { index } from "$sb/silverbullet-syscall/mod.ts"; import type { CompleteEvent, IndexTreeEvent, @@ -14,7 +14,7 @@ export async function indexTags({ name, tree }: IndexTreeEvent) { removeQueries(tree); const allTags = new Set(); collectNodesOfType(tree, "Hashtag").forEach((n) => { - allTags.add(n.children![0].text!); + allTags.add(n.children![0].text!.substring(1)); }); await index.batchSet( name,