google/gumbo-parser — pull request #34 by git-j (2013-08-19 20:39:29+00:00)
Title: bad nested lists are not interpreted usable for cleanup

with lists generated from a contenteditable in a webkit environment (qt 4.8) a implicit correction occurs: subsequent lists are rendered as sub-items of the previous list-item as if they were defined in correct order.
the w3c does not recommend or allow lists that contain lists without a li-tag arround them:
http://www.w3.org/TR/html/grouping-content.html#the-ul-element
webkit behavior see: http://jsfiddle.net/9d6TT/

feeding gumbo such a list does not result in the correct tag-hierarchy

the expected behavior of gumbo is to "correct" the invalid nesting of the lists and return a correct tag-hierarchy

content fed to gumbo:
"

item1

item1.1

item2

"

tag hierarchy expected from gumbo:
"

item1

item1.1

item2

"

tag hierarchy got from gumbo:
"

item1

item1.1

item2

"

reproduce:
make check
gdb --args ./lib/gumbo_test
break parser.cc:1660