Remove hashtag from index tag name, related to #322
This commit is contained in:
parent
f79bcf232b
commit
a7a5ed8f0a
@ -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<string>();
|
||||
collectNodesOfType(tree, "Hashtag").forEach((n) => {
|
||||
allTags.add(n.children![0].text!);
|
||||
allTags.add(n.children![0].text!.substring(1));
|
||||
});
|
||||
await index.batchSet(
|
||||
name,
|
||||
|
Loading…
Reference in New Issue
Block a user