Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

shibukawa
Copy link
Contributor

No description provided.

@shibukawa shibukawa force-pushed the feature/html5 branch 3 times, most recently from 6a8d89e to 5e0b1d1 Compare July 21, 2016 04:45
@lehmannro
Copy link
Contributor

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('')
Copy link
Contributor Author

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.

@shibukawa
Copy link
Contributor Author

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).

@tk0miya
Copy link
Member

tk0miya commented Jul 22, 2016

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.
To support the older docutils, it would be nice to provide the compat-layer like this.
So I think merging this now is effective and reasonable.

Anyway, we have to know the release plan of docutils.

@tk0miya tk0miya added builder:html type:enhancement enhance or introduce a new feature labels Jul 22, 2016
@shibukawa shibukawa force-pushed the feature/html5 branch 2 times, most recently from 4e20212 to e5528b5 Compare August 9, 2016 14:45
@shibukawa
Copy link
Contributor Author

I fix my PR to use as complete compatibility layer between docutils 0.13 and before versions as @tk0miya said.

@tk0miya tk0miya added this to the 1.5 milestone Aug 20, 2016
@tk0miya
Copy link
Member

tk0miya commented Aug 30, 2016

refs: #2376, #1562, #1733

@shibukawa shibukawa force-pushed the feature/html5 branch 2 times, most recently from 191aa68 to ca5db96 Compare September 5, 2016 02:31
@shibukawa
Copy link
Contributor Author

This PR is not needed anymore. Docutils released fucking awesome html5 writer with 0.13.1.

@shibukawa shibukawa closed this Feb 27, 2017
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
builder:html type:enhancement enhance or introduce a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants