WIP md parser

This commit is contained in:
2023-09-20 11:59:02 +02:00
parent d926e06fa8
commit 1454b301cd
3 changed files with 34 additions and 7 deletions

View File

@@ -542,8 +542,7 @@ class SingleLineCode extends Symbol {
* @returns {boolean}
*/
static canParse(line) {
const trimmedLine = line.trim();
return trimmedLine.startsWith("`");
return line.startsWith("`");
}
/**
@@ -917,9 +916,7 @@ const stageThreeProcessing = (symbols) => {
);
const paragraph = new Paragraph();
paragraph.children = children;
console.log(children, startIndex, endIndex);
localSymbols.splice(startIndex, children.length + 1, paragraph);
console.log(localSymbols.filter((s) => s instanceof JustALineBreak).length);
}
// Fix indentation of bullet elements
return localSymbols;