-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a basic support for automatic table of content generation #19
Conversation
…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
Thanks for contributing. Looks good to me, if the points above are fixed, i will merge. |
- 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).
I address (normally) all your comment (except unit tests) with bcdd5e9. |
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 ? |
remove u before '' ?!? |
I can try. But normally this syntax is correct in both python3 and 2. |
Add a basic support for automatic table of content generation
Thanks for merging! |
I will look at it tomorrow and create a new release. Thanks for contributing ;) |
I have made some changes arount the |
btw. travis will fail, because i used stuff from python 2.7... Does anyone need 2.6 support?!? EDIT: Have commit some changes for 2.6 |
It uses a macro-like syntax: <> to allow code reuse.
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: