Quellcode durchsuchen

ol/ul/li investigations and comments

Ivan Asmer vor 2 Jahren
Ursprung
Commit
fd395c10eb
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1 1
      index.mjs

+ 1 - 1
index.mjs

@@ -577,7 +577,7 @@ function buildAST(md, mdTags=syntax, offset=0, tree={tag: 'root'}, stack=[]){
             let { parent: {children: siblings} } = currentNode //current node are ol/ul
             if (siblings.length > 1 && siblings.last(-2).tag === currentNode.tag){ //two ol/ul one after another should be concated as li
                 siblings.pop() //so remove last ol/ul
-                currentNode = siblings.last() //make previous ol/ul currentNode
+                currentNode = siblings.last() //make previous ol/ul currentNode to add new LI into previous ol/li
             }
             const { children }     = currentNode
             const indentLength = currentNode.startMatch[1].length