Add a basic support for automatic table of content generation #19
It uses a macro-like syntax: <> to allow code reuse.
I added a toc_test methods to TestCreole2htmlMarkup to perform unittest. I pached the
…to a macro-like syntax: <<toc>> I added a toc_test methods to TestCreole2htmlMarkup to perform unittest. I pached the existing tests so that they are correct despite the modification I made. It supports: - max depth: depth=NUMBER - links to the correct section
- Avoid use of float('inf') - Rename python_list2html_list to toc_list2html (more coherent) - Rename variables in toc_list2html to be clearer - Use document.replace('<p><<toc>></p>', html_toc, 1) in toc emit to limit replacement Unit tests still fail in python2 (but pass with python3).
Still fails according to Travis with the following error:
I am not able to reproduce on my computer, all tests pass (python 3.3 on Fedora 20). And the syntax seems correct. Any idea ?