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
import HTML5 writer from working docutils repository #2805
Conversation
6a8d89e
to
5e0b1d1
Compare
Is this a verbatim copy of the version in Docutils? Let's not do this, please. It will lead to code drift and cruft accumulating in Sphinx. The better solution is to push the Docutils team to release a new version. |
suffix = '\n' | ||
if 'align' in node: | ||
atts['class'] = 'align-%s' % node['align'] | ||
self.context.append('') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Original Docutils' visit_image()
method doesn't push context stack anything anymore. I added this line to keep compatibility.
Main purpose of this PR is researching compatibility between existing html4css1 Writer and new html5 Writer. I modified three lines to docutils' code. I added comments (and fix style to pass flake8 check). And I fix test cases to pass. These diffs will help Sphinx maintainer team. I hope new Docutils's release too (for two years). |
Thank you for great work. +1 for merging this (but we have to verify this carefully). Even if docutils-0.13 will be released soon, we can't drop supports for docutils-0.12 or older suddenly. Anyway, we have to know the release plan of docutils. |
4e20212
to
e5528b5
Compare
I fix my PR to use as complete compatibility layer between docutils 0.13 and before versions as @tk0miya said. |
e5528b5
to
f513f8f
Compare
191aa68
to
ca5db96
Compare
ca5db96
to
b052675
Compare
This PR is not needed anymore. Docutils released fucking awesome html5 writer with 0.13.1. |
No description provided.