|
From: <mi...@us...> - 2016-05-26 17:47:39
|
Revision: 7946
http://sourceforge.net/p/docutils/code/7946
Author: milde
Date: 2016-05-26 17:47:37 +0000 (Thu, 26 May 2016)
Log Message:
-----------
Update html-plain writer.
Modified Paths:
--------------
trunk/docutils/HISTORY.txt
trunk/docutils/docutils/writers/html_plain/__init__.py
trunk/docutils/test/functional/expected/footnotes_html_plain.html
trunk/docutils/test/functional/expected/math_output_mathml.xhtml
trunk/docutils/test/functional/expected/standalone_rst_html_plain.html
Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2016-05-26 16:24:15 UTC (rev 7945)
+++ trunk/docutils/HISTORY.txt 2016-05-26 17:47:37 UTC (rev 7946)
@@ -59,7 +59,7 @@
* docutils/writers/html_plain/
- New HTML writer generating clean, polyglot_ markup conforming to
- `HTML 5`_ and compatible with `XHTML 1.0`_ Transitional.
+ `HTML 5`_.
The CSS stylesheets ``minimal.css`` and ``plain.css`` contain required
and recommended layout rules.
Modified: trunk/docutils/docutils/writers/html_plain/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/html_plain/__init__.py 2016-05-26 16:24:15 UTC (rev 7945)
+++ trunk/docutils/docutils/writers/html_plain/__init__.py 2016-05-26 17:47:37 UTC (rev 7946)
@@ -1,5 +1,5 @@
# .. coding: utf8
-# :Author: Günter Milde <mi...@us...>
+# :Author: Günter Milde <mi...@us...>
# :Revision: $Revision$
# :Date: $Date: 2005-06-28$
# :Copyright: © 2005, 2009 Günter Milde.
@@ -19,8 +19,7 @@
"""
Plain HyperText Markup Language document tree Writer.
-The output conforms to the `HTML 5` specification as well as
-to `XHTML 1.0 transitional`.
+The output conforms to the `HTML 5` specification.
The cascading style sheet "minimal.css" is required for proper viewing,
the style sheet "plain.css" improves reading experience.
@@ -212,10 +211,7 @@
head_prefix_template = ('<html xmlns="http://www.w3.org/1999/xhtml"'
' xml:lang="%(lang)s" lang="%(lang)s">\n<head>\n')
- content_type = ('<meta http-equiv="Content-Type"'
- ' content="text/html; charset=%s" />\n')
- content_type_xml = ('<meta http-equiv="Content-Type"'
- ' content="application/xhtml+xml; charset=%s" />\n')
+ content_type = ('<meta charset="%s"/>\n')
generator = ('<meta name="generator" content="Docutils %s: '
'http://docutils.sourceforge.net/" />\n')
@@ -225,9 +221,9 @@
# The latest version of MathJax from the distributed server:
# avaliable to the public under the `MathJax CDN Terms of Service`__
# __http://www.mathjax.org/download/mathjax-cdn-terms-of-service/
+ # may be overwritten by custom URL appended to "mathjax"
mathjax_url = ('https://cdn.mathjax.org/mathjax/latest/MathJax.js?'
'config=TeX-AMS_CHTML')
- # may be overwritten by custom URL appended to "mathjax"
stylesheet_link = '<link rel="stylesheet" href="%s" type="text/css" />\n'
embedded_stylesheet = '<style type="text/css">\n\n%s\n</style>\n'
@@ -246,7 +242,7 @@
if settings.xml_declaration:
self.head_prefix.append(self.xml_declaration
% settings.output_encoding)
- self.content_type = self.content_type_xml
+ self.content_type = ""
# encoding not interpolated:
self.html_prolog.append(self.xml_declaration)
self.head = self.meta[:]
Modified: trunk/docutils/test/functional/expected/footnotes_html_plain.html
===================================================================
--- trunk/docutils/test/functional/expected/footnotes_html_plain.html 2016-05-26 16:24:15 UTC (rev 7945)
+++ trunk/docutils/test/functional/expected/footnotes_html_plain.html 2016-05-26 17:47:37 UTC (rev 7946)
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta charset="utf-8"/>
<meta name="generator" content="Docutils 0.13: http://docutils.sourceforge.net/" />
<title>Test footnote and citation rendering</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/math_output_mathml.xhtml
===================================================================
--- trunk/docutils/test/functional/expected/math_output_mathml.xhtml 2016-05-26 16:24:15 UTC (rev 7945)
+++ trunk/docutils/test/functional/expected/math_output_mathml.xhtml 2016-05-26 17:47:37 UTC (rev 7946)
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta charset="utf-8"/>
<meta name="generator" content="Docutils 0.13: http://docutils.sourceforge.net/" />
<title>Mathematics</title>
<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
Modified: trunk/docutils/test/functional/expected/standalone_rst_html_plain.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_html_plain.html 2016-05-26 16:24:15 UTC (rev 7945)
+++ trunk/docutils/test/functional/expected/standalone_rst_html_plain.html 2016-05-26 17:47:37 UTC (rev 7946)
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta charset="utf-8"/>
<meta name="generator" content="Docutils 0.13: http://docutils.sourceforge.net/" />
<title>reStructuredText Test Document</title>
<meta name="author" content="David Goodger" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|