- if (currentListElement.parent.indent < 0){
- // reached first depth level, cannot go any deeper.
- // This special situation arisesbb only when lint indents are not properly aligned.
- // That is, document structure is incorrect.
- ListElement newElement = new ListElement(title, indent, currentListElement.parent, type);
- currentListElement.parent.addContent(newElement);
- currentListElement = newElement;
- return;
- }
-