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
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions sphinx/themes/basic/changes/frameset.html
@@ -1,5 +1,4 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
"http://www.w3.org/TR/html4/frameset.dtd">
<!DOCTYPE html>
<html{% if language is not none %} lang="{{ language }}"{% endif %}>
<head>
<title>{% trans version=version|e, docstitle=docstitle|e %}Changes in Version {{ version }} &#8212; {{ docstitle }}{% endtrans %}</title>
Expand Down
3 changes: 1 addition & 2 deletions sphinx/themes/basic/changes/rstsource.html
@@ -1,5 +1,4 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<!DOCTYPE html>
<html{% if language is not none %} lang="{{ language }}"{% endif %}>
<head>
<title>{% trans filename=filename, docstitle=docstitle|e %}{{ filename }} &#8212; {{ docstitle }}{% endtrans %}</title>
Expand Down
3 changes: 1 addition & 2 deletions sphinx/themes/basic/changes/versionchanges.html
Expand Up @@ -3,8 +3,7 @@
<li><a href="rst/{{ docname }}.html#L{{ lineno-10 }}" target="src">{{ entry }}</a></li>
{% endfor %}</ul>
{% endmacro -%}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<!DOCTYPE html>
<html{% if language is not none %} lang="{{ language }}"{% endif %}>
<head>
<link rel="stylesheet" href="default.css">
Expand Down
3 changes: 1 addition & 2 deletions sphinx/themes/basic/layout.html
Expand Up @@ -8,8 +8,7 @@
:license: BSD, see LICENSE for details.
#}
{%- block doctype -%}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html>
{%- endblock %}
{%- set reldelim1 = reldelim1 is not defined and ' &#187;' or reldelim1 %}
{%- set reldelim2 = reldelim2 is not defined and ' |' or reldelim2 %}
Expand Down
3 changes: 1 addition & 2 deletions sphinx/themes/nonav/layout.html
Expand Up @@ -10,8 +10,7 @@
{%- extends "basic/layout.html" %}

{%- block doctype -%}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<!DOCTYPE html>
{%- endblock -%}
{# add only basic navigation links #}
{% block sidebar1 %}{% endblock %}
Expand Down
19 changes: 19 additions & 0 deletions sphinx/util/compat_docutils/__init__.py
@@ -0,0 +1,19 @@
# -*- coding: utf-8 -*-
"""
sphinx.util.compat_docutils
~~~~~~~~~~~~~~~~~~~~~~~~~~~

Docutils compatibility absorbing layer for Sphinx.

:copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""

import docutils

if docutils.__version__ < '0.13':
from sphinx.util.compat_docutils.html5 import Writer, HTMLTranslator
else:
from docutils.writers.html_plain import Writer, HTMLTranslator

__all__ = ('Writer', 'HTMLTranslator')