diff options
| author | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2015-03-11 15:55:43 +0000 |
|---|---|---|
| committer | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2015-03-11 15:55:43 +0000 |
| commit | 8d8f4cd077a9210a23e87f2fa4514fb16f808c2a (patch) | |
| tree | a3496040b0179af5932a9527e12fdf305e1968a4 /docutils/test | |
| parent | ce9356125402e102f27cd7bf4645f1022958a4ee (diff) | |
| download | docutils-8d8f4cd077a9210a23e87f2fa4514fb16f808c2a.tar.gz | |
Announce the new HTML writers. Small fixes to get valid HTML.
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@7820 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils/test')
3 files changed, 38 insertions, 52 deletions
diff --git a/docutils/test/functional/expected/standalone_rst_html_base.html b/docutils/test/functional/expected/standalone_rst_html_base.html index 6db990a27..8fe2ecb1b 100644 --- a/docutils/test/functional/expected/standalone_rst_html_base.html +++ b/docutils/test/functional/expected/standalone_rst_html_base.html @@ -352,13 +352,11 @@ the preceding paragraph (over there <span class="docutils literal"><span class=" <pre class="literal-block">if literal_block: text = 'is left as-is' spaces_and_linebreaks = 'are preserved' - markup_processing = None -</pre> + markup_processing = None</pre> <p>Or they can be quoted without indentation:</p> <pre class="literal-block">>> Great idea! > -> Why didn't I think of that? -</pre> +> Why didn't I think of that?</pre> </div> <div class="section" id="line-blocks"> <h2><a class="toc-backref" href="#id51"><span class="sectnum">2.8</span> Line Blocks</a></h2> @@ -443,7 +441,7 @@ as follows and begins now. All brontosauruses are thin at one end, much much thicker in the middle and then thin again at the far end. That is my theory, it is mine, and belongs to me and I own it, and what it is too.</p> -<p class="attribution">—Anne Elk (Miss)</p> +<p class="attribution">—<cite>Anne Elk (Miss)</cite></p> </blockquote> <p>The language of a quote (like any other object) can be specified by a class attribute:</p> @@ -756,8 +754,7 @@ allowed (e.g. inside a directive).</p> <p>Another compound statement:</p> <div class="compound"> <p class="compound-first">Compound 2, a literal block:</p> -<pre class="compound-middle literal-block">Compound 2, literal. -</pre> +<pre class="compound-middle literal-block">Compound 2, literal.</pre> <p class="compound-last">Compound 2, this is a test.</p> </div> <div class="compound"> @@ -765,8 +762,7 @@ allowed (e.g. inside a directive).</p> </div> <div class="compound"> <pre class="compound-first literal-block">Compound 4. -This one starts with a literal block. -</pre> +This one starts with a literal block.</pre> <p class="compound-last">Compound 4, a paragraph.</p> </div> <p>Now something <em>really</em> perverted -- a nested compound block. This is @@ -815,8 +811,7 @@ paragraph.</p></td> This line is indented. The next line is blank. Inline markup is supported, e.g. <em>emphasis</em>, <strong>strong</strong>, <span class="docutils literal">literal -text</span>, footnotes <a class="footnote-reference" href="#id8" id="id22">[1]</a>, <span class="target" id="hyperlink-targets">hyperlink targets</span>, and <a class="reference external" href="http://www.python.org/">references</a>. -</pre> +text</span>, footnotes <a class="footnote-reference" href="#id8" id="id22">[1]</a>, <span class="target" id="hyperlink-targets">hyperlink targets</span>, and <a class="reference external" href="http://www.python.org/">references</a>.</pre> </div> <div class="section" id="code"> <h3><a class="toc-backref" href="#id95"><span class="sectnum">2.14.9</span> Code</a></h3> @@ -826,14 +821,12 @@ syntax highlighter and can be formatted with a style sheet. (Code parsing is turned off using the <span class="docutils literal"><span class="pre">syntax-highlight</span></span> config setting in the test conversions in order to get identical results with/without installed Pygments highlighter.)</p> -<pre class="code python literal-block">print 'This is Python code.' -</pre> +<pre class="code python literal-block"><code>print 'This is Python code.'</code></pre> <p>The <span class="docutils literal"><span class="pre">:number-lines:</span></span> option (with optional start value) generates line numbers:</p> -<pre class="code python literal-block"><span class="ln"> 8 </span># print integers from 0 to 9: +<pre class="code python literal-block"><code><span class="ln"> 8 </span># print integers from 0 to 9: <span class="ln"> 9 </span>for i in range(10): -<span class="ln">10 </span> print i -</pre> +<span class="ln">10 </span> print i</code></pre> <p>For inline code snippets, there is the <cite>code</cite> role, which can be used directly (the code will not be parsed/tagged, as the language is not known) or as base for special code roles, e.g. the LaTeX code in the next @@ -842,9 +835,8 @@ paragraph.</p> <code class="tex">\alpha = f(x)</code> prints <span class="formula"><i>α</i> = <i>f</i>(<i>x</i>)</span>.</p> <p>The <span class="docutils literal">:code:</span> option of the <cite>include</cite> directive sets the included content as a code block, here the rst file <span class="docutils literal">header_footer.txt</span> with line numbers:</p> -<pre class="code rst literal-block"><span class="ln">1 </span>.. header:: Document header -<span class="ln">2 </span>.. footer:: Document footer -</pre> +<pre class="code rst literal-block"><code><span class="ln">1 </span>.. header:: Document header +<span class="ln">2 </span>.. footer:: Document footer</code></pre> </div> </div> <div class="section" id="substitution-definitions"> @@ -992,7 +984,7 @@ span rows.</p> <tr><td><p>body row 5</p></td> <td colspan="2"><p>Cells may also be empty: <span class="docutils literal"><span class="pre">--></span></span></p></td> -<td> </td> +<td></td> </tr> </tbody> </table> @@ -1053,8 +1045,7 @@ crunchy, now would it?</p></td> <style type="text/css"><!-- .green {color: green;} .sc {font-variant: small-caps;} - --></style> -</pre> + --></style></pre> <p><span class="green sc" lang="en-gb">British colourful text in small-caps</span>.</p> </li> </ul> @@ -1180,8 +1171,7 @@ this behaviour with the <a class="reference internal" href="#run-in">run-in</a> <dd><p>of the field name width is possible with CSS instead of the <cite>field-name-limit</cite> configuration setting, for example:</p> -<pre class="literal-block">dl.field-list > dd { margin-left: 6em; } -</pre> +<pre class="literal-block">dl.field-list > dd { margin-left: 6em; }</pre> </dd> </dl> <div class="section" id="styling-with-class-arguments"> @@ -1436,7 +1426,7 @@ section, "Docutils System Messages":</p> <div class="footer"> <hr class="footer" /> <p>Document footer</p> -<p><a class="reference external" href="http://validator.w3.org/check?uri=referer"><img alt="Conforms to HTML 5!" src="https://validator-suite.w3.org/icons/vs-blue-256.png" style="width: 88px; height: 31px;" /></a> <a class="reference external" href="http://jigsaw.w3.org/css-validator/check/referer"><img alt="Valid CSS 2.1!" src="http://jigsaw.w3.org/css-validator/images/vcss" style="width: 88px; height: 31px;" /></a></p> +<p><a class="reference external" href="http://www.w3.org/TR/html5/"><img alt="Conforms to HTML 5" src="http://www.w3.org/html/logo/badge/html5-badge-h-css3-semantics.png" style="width: 88px; height: 31px;" /></a> <a class="reference external" href="http://validator.w3.org/check?uri=referer"><img alt="Check validity!" src="https://validator-suite.w3.org/icons/vs-blue-256.png" style="width: 88px; height: 31px;" /></a> <a class="reference external" href="http://jigsaw.w3.org/css-validator/check/referer"><img alt="Valid CSS 2.1!" src="http://jigsaw.w3.org/css-validator/images/vcss" style="width: 88px; height: 31px;" /></a></p> </div> </body> diff --git a/docutils/test/functional/expected/standalone_rst_xhtml11.xhtml b/docutils/test/functional/expected/standalone_rst_xhtml11.xhtml index 521ef9acc..daf861f46 100644 --- a/docutils/test/functional/expected/standalone_rst_xhtml11.xhtml +++ b/docutils/test/functional/expected/standalone_rst_xhtml11.xhtml @@ -354,13 +354,11 @@ the preceding paragraph (over there <span class="docutils literal"><span class=" <pre class="literal-block">if literal_block: text = 'is left as-is' spaces_and_linebreaks = 'are preserved' - markup_processing = None -</pre> + markup_processing = None</pre> <p>Or they can be quoted without indentation:</p> <pre class="literal-block">>> Great idea! > -> Why didn't I think of that? -</pre> +> Why didn't I think of that?</pre> </div> <div class="section" id="line-blocks"> <h2><a class="toc-backref" href="#id51"><span class="sectnum">2.8</span> Line Blocks</a></h2> @@ -445,7 +443,7 @@ as follows and begins now. All brontosauruses are thin at one end, much much thicker in the middle and then thin again at the far end. That is my theory, it is mine, and belongs to me and I own it, and what it is too.</p> -<p class="attribution">—Anne Elk (Miss)</p> +<p class="attribution">—<cite>Anne Elk (Miss)</cite></p> </blockquote> <p>The language of a quote (like any other object) can be specified by a class attribute:</p> @@ -758,8 +756,7 @@ allowed (e.g. inside a directive).</p> <p>Another compound statement:</p> <div class="compound"> <p class="compound-first">Compound 2, a literal block:</p> -<pre class="compound-middle literal-block">Compound 2, literal. -</pre> +<pre class="compound-middle literal-block">Compound 2, literal.</pre> <p class="compound-last">Compound 2, this is a test.</p> </div> <div class="compound"> @@ -767,8 +764,7 @@ allowed (e.g. inside a directive).</p> </div> <div class="compound"> <pre class="compound-first literal-block">Compound 4. -This one starts with a literal block. -</pre> +This one starts with a literal block.</pre> <p class="compound-last">Compound 4, a paragraph.</p> </div> <p>Now something <em>really</em> perverted -- a nested compound block. This is @@ -817,8 +813,7 @@ paragraph.</p></td> This line is indented. The next line is blank. Inline markup is supported, e.g. <em>emphasis</em>, <strong>strong</strong>, <span class="docutils literal">literal -text</span>, footnotes <a class="footnote-reference" href="#id8" id="id22">[1]</a>, <span class="target" id="hyperlink-targets">hyperlink targets</span>, and <a class="reference external" href="http://www.python.org/">references</a>. -</pre> +text</span>, footnotes <a class="footnote-reference" href="#id8" id="id22">[1]</a>, <span class="target" id="hyperlink-targets">hyperlink targets</span>, and <a class="reference external" href="http://www.python.org/">references</a>.</pre> </div> <div class="section" id="code"> <h3><a class="toc-backref" href="#id96"><span class="sectnum">2.14.9</span> Code</a></h3> @@ -828,14 +823,12 @@ syntax highlighter and can be formatted with a style sheet. (Code parsing is turned off using the <span class="docutils literal"><span class="pre">syntax-highlight</span></span> config setting in the test conversions in order to get identical results with/without installed Pygments highlighter.)</p> -<pre class="code python literal-block">print 'This is Python code.' -</pre> +<pre class="code python literal-block"><code>print 'This is Python code.'</code></pre> <p>The <span class="docutils literal"><span class="pre">:number-lines:</span></span> option (with optional start value) generates line numbers:</p> -<pre class="code python literal-block"><span class="ln"> 8 </span># print integers from 0 to 9: +<pre class="code python literal-block"><code><span class="ln"> 8 </span># print integers from 0 to 9: <span class="ln"> 9 </span>for i in range(10): -<span class="ln">10 </span> print i -</pre> +<span class="ln">10 </span> print i</code></pre> <p>For inline code snippets, there is the <cite>code</cite> role, which can be used directly (the code will not be parsed/tagged, as the language is not known) or as base for special code roles, e.g. the LaTeX code in the next @@ -845,9 +838,8 @@ paragraph.</p> <mrow><mi>α</mi><mo>=</mo><mi>f</mi><mo>(</mo><mi>x</mi><mo>)</mo></mrow></math>.</p> <p>The <span class="docutils literal">:code:</span> option of the <cite>include</cite> directive sets the included content as a code block, here the rst file <span class="docutils literal">header_footer.txt</span> with line numbers:</p> -<pre class="code rst literal-block"><span class="ln">1 </span>.. header:: Document header -<span class="ln">2 </span>.. footer:: Document footer -</pre> +<pre class="code rst literal-block"><code><span class="ln">1 </span>.. header:: Document header +<span class="ln">2 </span>.. footer:: Document footer</code></pre> </div> </div> <div class="section" id="substitution-definitions"> @@ -995,7 +987,7 @@ span rows.</p> <tr><td><p>body row 5</p></td> <td colspan="2"><p>Cells may also be empty: <span class="docutils literal"><span class="pre">--></span></span></p></td> -<td> </td> +<td></td> </tr> </tbody> </table> @@ -1056,8 +1048,7 @@ crunchy, now would it?</p></td> <style type="text/css"><!-- .green {color: green;} .sc {font-variant: small-caps;} - --></style> -</pre> + --></style></pre> <p><span class="green sc" xml:lang="en-gb">British colourful text in small-caps</span>.</p> </li> </ul> @@ -1202,8 +1193,7 @@ suppress this behaviour with the <a class="reference internal" href="#run-in">ru <dd><p>of the field name width is possible with CSS instead of the <cite>field-name-limit</cite> configuration setting, for example:</p> -<pre class="literal-block">dl.field-list > dd { margin-left: 6em; } -</pre> +<pre class="literal-block">dl.field-list > dd { margin-left: 6em; }</pre> </dd> </dl> <div class="section" id="styling-with-class-arguments"> diff --git a/docutils/test/functional/input/standalone_rst_html_base.txt b/docutils/test/functional/input/standalone_rst_html_base.txt index 81b72b0bd..1ae91134d 100644 --- a/docutils/test/functional/input/standalone_rst_html_base.txt +++ b/docutils/test/functional/input/standalone_rst_html_base.txt @@ -202,7 +202,7 @@ Of course, also "booktabs" style tables can be numbered: Maths ----- -For maximal compatibility, the ``html-output`` setting defaults to »HTML«. +For maximal compatibility, the ``html-output`` setting defaults to »HTML«. (HTML 5 accepts also MathML and SVG as nested languages.) The linear mapping :math:`f: \mathbb{C}^{N}\longmapsto\mathbb{C}^{N}` @@ -219,12 +219,18 @@ transformation (DFT). .. include:: data/errors.txt -.. footer:: |validator| |valid-CSS2| +.. footer:: |HTML 5| |validator| |valid-CSS2| + +.. |HTML 5| image:: http://www.w3.org/html/logo/badge/html5-badge-h-css3-semantics.png + :height: 31 + :width: 88 + :alt: Conforms to HTML 5 + :target: http://www.w3.org/TR/html5/ .. |validator| image:: https://validator-suite.w3.org/icons/vs-blue-256.png :height: 31 :width: 88 - :alt: Conforms to HTML 5! + :alt: Check validity! :target: http://validator.w3.org/check?uri=referer .. |valid-CSS2| image:: http://jigsaw.w3.org/css-validator/images/vcss |
