public void enterListItem(NodeContext context) { int times, dots = 0; if ((times = context.getIntAttribute("times.count", -1)) > 0) { if (currentList.type == ListType.Unordered) { if (currentList.bullets == times) { } else if (currentList.bullets < times) { currentList = ListContext.withParent(currentList); currentList.bullets = times; } else if (currentList.bullets > times) { while (currentList.bullets > times && currentList.level > 1) { handler.endUnorderedList(currentList.level); currentList = currentList.parent; } } } else if (currentList.type == ListType.Ordered) { currentList = ListContext.withParent(currentList); currentList.bullets = times; } } else if ((dots = context.getIntAttribute("dots.count", -1)) > 0) { if (currentList.type == ListType.Ordered) { if (currentList.bullets == dots) { } else if (currentList.bullets < dots) { currentList = ListContext.withParent(currentList); currentList.bullets = dots; } else if (currentList.bullets > dots) { while (currentList.bullets > times && currentList.level > 1) { handler.endOrderedList(currentList.level); currentList = currentList.parent; } } } else if (currentList.type == ListType.Unordered) { currentList = ListContext.withParent(currentList); currentList.bullets = dots; } } if (currentList.type == null) { if (times > 0) { currentList.type = ListType.Unordered; currentList.bullets = times; handler.startUnorderedList(currentList.level, consumeAttList()); } else if (dots > 0) { currentList.type = ListType.Ordered; currentList.bullets = dots; handler.startOrderedList(currentList.level, consumeAttList()); } } handler.startListItem(currentList.level); clearAttList(); }