A whole lot of enhancements

This commit is contained in:
Zef Hemel
2022-04-04 15:25:07 +02:00
parent 16577c8ea2
commit a7cd3ea7e0
26 changed files with 322 additions and 181 deletions
+3 -3
View File
@@ -3,8 +3,8 @@ import wikiMarkdownLang from "../webapp/parser";
export type MarkdownTree = {
type?: string; // undefined === text node
from: number;
to: number;
from?: number;
to?: number;
text?: string;
children?: MarkdownTree[];
};
@@ -39,7 +39,7 @@ function treeToAST(text: string, n: SyntaxNode): MarkdownTree {
});
}
newChildren.push(child);
index = child.to;
index = child.to!;
}
let s = text.substring(index, n.to);
if (s) {