Explorar el Código

ol/ul/li investigations and comments

Ivan Asmer hace 2 años
padre
commit
fd395c10eb
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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