Changed all indexes to use (pre) parsed trees.
This commit is contained in:
@@ -45,9 +45,9 @@ export class EventedSpacePrimitives implements SpacePrimitives {
|
||||
this.eventHook
|
||||
.dispatchEvent("page:saved", pageName)
|
||||
.then(() => {
|
||||
return this.eventHook.dispatchEvent("page:index", {
|
||||
return this.eventHook.dispatchEvent("page:index_text", {
|
||||
name: pageName,
|
||||
text: text,
|
||||
text,
|
||||
});
|
||||
})
|
||||
.catch((e) => {
|
||||
|
||||
@@ -13,6 +13,10 @@ export function addParentPointers(tree: ParseTree) {
|
||||
return;
|
||||
}
|
||||
for (let child of tree.children) {
|
||||
if (child.parent) {
|
||||
// Already added parent pointers before
|
||||
return;
|
||||
}
|
||||
child.parent = tree;
|
||||
addParentPointers(child);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user