Make TocTreeprocessor extendable and be more gentle on badly structured headings
Merge pull request #191 from benjaoming/toc-fix

Make TocTreeprocessor extendable and be gentle on badly structured headings
code cleanup
Merge branch 'toc-fix'