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 { 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 {
|
import type {
|
||||||
CompleteEvent,
|
CompleteEvent,
|
||||||
IndexTreeEvent,
|
IndexTreeEvent,
|
||||||
@ -14,7 +14,7 @@ export async function indexTags({ name, tree }: IndexTreeEvent) {
|
|||||||
removeQueries(tree);
|
removeQueries(tree);
|
||||||
const allTags = new Set<string>();
|
const allTags = new Set<string>();
|
||||||
collectNodesOfType(tree, "Hashtag").forEach((n) => {
|
collectNodesOfType(tree, "Hashtag").forEach((n) => {
|
||||||
allTags.add(n.children![0].text!);
|
allTags.add(n.children![0].text!.substring(1));
|
||||||
});
|
});
|
||||||
await index.batchSet(
|
await index.batchSet(
|
||||||
name,
|
name,
|
||||||
|
Loading…
Reference in New Issue
Block a user