erebor/asciidoctor — pull request #45 by mojavelinux (2012-12-29 02:26:54+00:00)
Title: rework list items & section partitioning

- major rework of list items to handle nested levels and blocks correctly
- bullet length should not dictate nesting level of lists, rather how they alternate
- honor all variations of number styles on ordered lists
- add much more robust tests for lists, make the tests more clear
- take into account blocks when partitioning sections (headings can't be inside blocks)
- skip over check for section when lexing a block
- lots 'o tomdoc
- strip indentation on literal paragraphs correctly (remove indentation equal to least indented line)
- rework how list lines are collected to be easier to read, more robust and more compliant
- change where list continuations are calculated (localize to the list line collector)

After integrating these changes, all of the outline and definition lists in the AsciiDoc cheatsheet should work as expected.

Btw, I do realize that the extra processing in next_section is starting to look redundant. I'm going to look into whether we can build the document structure without having to partition the sections first (which is the streaming approach that AsciiDoc uses). For now, though, the extra processing is necessary to make Asciidoctor compliant.