|
From: <mi...@us...> - 2021-06-30 07:48:48
|
Revision: 8786
http://sourceforge.net/p/docutils/code/8786
Author: milde
Date: 2021-06-30 07:48:44 +0000 (Wed, 30 Jun 2021)
Log Message:
-----------
HTML5: Improve accessibility of section headings.
Mark the internal back-refences from section headings to the ToC
with DPub-ARIA role "doc-backref".
Use "aria-level" instead of a class argument value for section headings
with nesting level > 6 (for level 1 to 6, the level is determined by
the HTML tag).
Mind that in HTML5, heading level 1 is reserved for the document title
and section headings start with level 2.
Add functional test sample for deeply nested sections.
Merge functional tests for additonal HTML5 features.
Modified Paths:
--------------
trunk/docutils/HISTORY.txt
trunk/docutils/docutils/writers/_html_base.py
trunk/docutils/docutils/writers/html4css1/__init__.py
trunk/docutils/test/functional/expected/standalone_rst_html5.html
trunk/docutils/test/functional/input/data/video.txt
Added Paths:
-----------
trunk/docutils/test/functional/expected/misc_rst_html5.html
trunk/docutils/test/functional/input/data/embed_images.txt
trunk/docutils/test/functional/input/misc_rst_html5.txt
trunk/docutils/test/functional/tests/misc_rst_html5.py
Removed Paths:
-------------
trunk/docutils/test/functional/expected/video.html
trunk/docutils/test/functional/input/embed_images.txt
trunk/docutils/test/functional/tests/embed_images_html5.py
trunk/docutils/test/functional/tests/html5_video.py
Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2021-06-30 07:48:24 UTC (rev 8785)
+++ trunk/docutils/HISTORY.txt 2021-06-30 07:48:44 UTC (rev 8786)
@@ -69,6 +69,9 @@
the table of contents, footnote, references, footnotes, citations,
and backlinks.
+ - Use "aria-level" attribute instead of invalid tags <h7>, <h8>, ...
+ for headings of deeply nested sections.
+
- Do not set classes "compound-first", "compound-middle", or
"compound-last" to elements nested in a compound.
Use class value "backrefs" instead of "fn-backref" for a span of
@@ -77,13 +80,14 @@
- Removed attribute ``HTMLTranslator.topic_classes``
- Items of a definition list with class argument "details" are
- converted to `details disclosure elements` (not with HTML4).
+ converted to `details disclosure elements`.
* docutils/writers/html4css1/__init__.py:
- - Overwrite methods in _html_base.HTMLTranslator that use HTM5 tags.
-
+ - Overwrite methods in _html_base.HTMLTranslator that use HTM5 tags
+ (details, aside, nav, ...) and attributes (role, aria-level).
+
* docutils/writers/latex2e/__init__.py
- The setting `legacy_class_functions`_ now defaults to "False".
Modified: trunk/docutils/docutils/writers/_html_base.py
===================================================================
--- trunk/docutils/docutils/writers/_html_base.py 2021-06-30 07:48:24 UTC (rev 8785)
+++ trunk/docutils/docutils/writers/_html_base.py 2021-06-30 07:48:44 UTC (rev 8786)
@@ -1606,23 +1606,19 @@
self.body.append('</thead>\n')
def section_title_tags(self, node):
- classes = []
+ atts = {}
h_level = self.section_level + self.initial_header_level - 1
- if (len(node.parent) >= 2
- and isinstance(node.parent[1], nodes.subtitle)):
- classes.append('with-subtitle')
- # TODO: use '<h6 aria-level="%s">' % h_level
- # for h_level > 6 (HTML5 only)
+ # Only 6 heading levels have dedicated HTML tags.
+ tagname = 'h%i' % min(h_level, 6)
if h_level > 6:
- classes.append('h%i' % h_level)
- tagname = 'h%i' % min(h_level, 6)
- start_tag = self.starttag(node, tagname, '', classes=classes)
+ atts['aria-level'] = h_level
+ start_tag = self.starttag(node, tagname, '', **atts)
if node.hasattr('refid'):
atts = {}
atts['class'] = 'toc-backref'
- # atts['role'] = 'doc-backlink' # HTML5 only
+ atts['role'] = 'doc-backlink' # HTML5 only
atts['href'] = '#' + node['refid']
- start_tag += self.starttag({}, 'a', '', **atts)
+ start_tag += self.starttag(nodes.reference(), 'a', '', **atts)
close_tag = '</a></%s>\n' % tagname
else:
close_tag = '</%s>\n' % tagname
@@ -1629,7 +1625,6 @@
return start_tag, close_tag
def visit_title(self, node):
- """Only 6 section levels are supported by HTML."""
close_tag = '</p>\n'
if isinstance(node.parent, nodes.topic):
self.body.append(
@@ -1652,6 +1647,7 @@
self.in_document_title = len(self.body)
else:
assert isinstance(node.parent, nodes.section)
+ # Get correct heading and evt. backlink tags
start_tag, close_tag = self.section_title_tags(node)
self.body.append(start_tag)
self.context.append(close_tag)
Modified: trunk/docutils/docutils/writers/html4css1/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/html4css1/__init__.py 2021-06-30 07:48:24 UTC (rev 8785)
+++ trunk/docutils/docutils/writers/html4css1/__init__.py 2021-06-30 07:48:44 UTC (rev 8786)
@@ -870,13 +870,6 @@
def depart_tbody(self, node):
self.body.append('</tbody>\n')
- # hard-coded vertical alignment
- def visit_thead(self, node):
- self.body.append(self.starttag(node, 'thead', valign='bottom'))
- #
- def depart_thead(self, node):
- self.body.append('</thead>\n')
-
# no special handling of "details" in definition list
def visit_term(self, node):
self.body.append(self.starttag(node, 'dt', '',
@@ -886,7 +879,36 @@
def depart_term(self, node):
pass
+ # hard-coded vertical alignment
+ def visit_thead(self, node):
+ self.body.append(self.starttag(node, 'thead', valign='bottom'))
+ #
+ def depart_thead(self, node):
+ self.body.append('</thead>\n')
+ # auxilliary method, called by visit_title()
+ # "with-subtitle" class, no ARIA roles
+ def section_title_tags(self, node):
+ classes = []
+ h_level = self.section_level + self.initial_header_level - 1
+ if (len(node.parent) >= 2
+ and isinstance(node.parent[1], nodes.subtitle)):
+ classes.append('with-subtitle')
+ if h_level > 6:
+ classes.append('h%i' % h_level)
+ tagname = 'h%i' % min(h_level, 6)
+ start_tag = self.starttag(node, tagname, '', classes=classes)
+ if node.hasattr('refid'):
+ atts = {}
+ atts['class'] = 'toc-backref'
+ atts['href'] = '#' + node['refid']
+ start_tag += self.starttag({}, 'a', '', **atts)
+ close_tag = '</a></%s>\n' % tagname
+ else:
+ close_tag = '</%s>\n' % tagname
+ return start_tag, close_tag
+
+
class SimpleListChecker(writers._html_base.SimpleListChecker):
"""
Added: trunk/docutils/test/functional/expected/misc_rst_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/misc_rst_html5.html (rev 0)
+++ trunk/docutils/test/functional/expected/misc_rst_html5.html 2021-06-30 07:48:44 UTC (rev 8786)
@@ -0,0 +1,102 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta charset="utf-8"/>
+<meta name="viewport" content="width=device-width, initial-scale=1" />
+<meta name="generator" content="Docutils 0.18b.dev: http://docutils.sourceforge.net/" />
+<title>Additional tests with HTML 5</title>
+<link rel="stylesheet" href="../../../docutils/writers/html5_polyglot/minimal.css" type="text/css" />
+<link rel="stylesheet" href="../../../docutils/writers/html5_polyglot/plain.css" type="text/css" />
+<link rel="stylesheet" href="../../../docutils/writers/html5_polyglot/math.css" type="text/css" />
+</head>
+<body>
+<main id="additional-tests-with-html-5">
+<h1 class="title">Additional tests with HTML 5</h1>
+
+<section id="section-heading-levels">
+<h2>Section heading levels</h2>
+</section>
+<section id="level-1">
+<h2>Level 1</h2>
+<p>Nested sections</p>
+<section id="level-2">
+<h3>Level 2</h3>
+<p>reach at some level</p>
+<section id="level-3">
+<h4>Level 3</h4>
+<p>(depending on the document class and output format)</p>
+<section id="level-4">
+<h5>level 4</h5>
+<p>a level</p>
+<section id="level-5">
+<h6>level 5</h6>
+<p>that is not supported by the output format.</p>
+<section id="level-6">
+<h6 aria-level="7">level 6</h6>
+<p>Unsupported in LaTeX and HTML5
+(HTML5 reserves the 1st level for the document title).</p>
+<section id="level-7">
+<h6 aria-level="8">level 7</h6>
+<p>Unsupported in HTML4.</p>
+<section id="level-8">
+<h6 aria-level="9">level 8</h6>
+<p>Unsupported in ODT.</p>
+</section>
+</section>
+</section>
+</section>
+</section>
+</section>
+</section>
+</section>
+<section id="section-titles-with-inline-markup">
+<span id="references"></span><h2>Section titles with inline markup</h2>
+<section id="emphasized-h2o-x-2-and-references">
+<h3><em>emphasized</em>, H<sub>2</sub>O, <span class="formula"><i>x</i><sup>2</sup></span>, and <a class="reference internal" href="#references">references</a></h3>
+</section>
+<section id="substitutions-fail">
+<h3>Substitutions work</h3>
+</section>
+</section>
+<section id="embedded-images">
+<h2>Embedded Images</h2>
+<p>The “embed” flag tells Docutils that it should
+try to embed the image in the output document.</p>
+<p>If the image can be read from the local file system, it is <a class="reference external" href="https://en.wikipedia.org/wiki/Base64">base64</a>
+encoded and included as a <a class="reference external" href="https://en.wikipedia.org/wiki/Data_URI_scheme">data URI</a>.
+In future, SVG images may be directly inserted into HTML5.</p>
+<figure class="align-center">
+<img alt="biohazard" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABGdBTUEAANkE3LLaAgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAAZQTFRF////AAAAVcLTfgAAAAF0Uk5TAEDm2GYAAAA2SURBVHicYmBRYOAQYJCQYJC+wSBjAUL2fxjq6hgueTNM7AQh3g0MzAdAiP0BUBYAAAD//wMA4pkLDrFBDzUAAAAASUVORK5CYII=" />
+<figcaption>
+<p>Embedded image in a figure.</p>
+</figcaption>
+</figure>
+<p>Embedded inline image <img alt="inline-embedded" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABGdBTUEAANkE3LLaAgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAAZQTFRF////AAAAVcLTfgAAAAF0Uk5TAEDm2GYAAAA2SURBVHicYmBRYOAQYJCQYJC+wSBjAUL2fxjq6hgueTNM7AQh3g0MzAdAiP0BUBYAAAD//wMA4pkLDrFBDzUAAAAASUVORK5CYII=" style="height: 0.8em;" /> scaled to a height of 0.8 em.</p>
+</section>
+<section id="moving-images-video">
+<h2>Moving images (video)</h2>
+<p>If the URL given to <cite>images and figures</cite> hints to a video format
+supported by HTML 5 (MIME types ‘video/mp4’, ‘video/webm’, or
+‘video/ogg’), the HTML5 writer will place it in a <a class="reference external" href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video">video element</a>.</p>
+<video class="align-left" src="../../../docs/user/rst/images/pens.mp4" title="left-aligned test video">
+<a href="../../../docs/user/rst/images/pens.mp4">left-aligned test video</a>
+</video>
+<p>A class option value “controls” tells the browser to display controls
+for video playback.</p>
+<p>It is a good idea to include width and height attributes. If
+height and width are not set, the page might flicker while the video
+loads. According to the <a class="reference external" href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video">HTML5 spec</a>, hight and width must be
+specified as pixel values.</p>
+<figure class="align-center">
+<video class="controls" controls="controls" src="../../../docs/user/rst/images/pens.mp4" title="test video in a figure" width="200">
+<a href="../../../docs/user/rst/images/pens.mp4">test video in a figure</a>
+</video>
+<figcaption>
+<p>Simple test video in a centered figure</p>
+</figcaption>
+</figure>
+<p>A video like this <video src="../../../docs/user/rst/images/pens.mp4" title="rotating pens video" width="60"><a href="../../../docs/user/rst/images/pens.mp4">rotating pens video</a></video> can be included inline via substitution.</p>
+</section>
+</main>
+</body>
+</html>
Property changes on: trunk/docutils/test/functional/expected/misc_rst_html5.html
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Revision
\ No newline at end of property
Modified: trunk/docutils/test/functional/expected/standalone_rst_html5.html
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_html5.html 2021-06-30 07:48:24 UTC (rev 8785)
+++ trunk/docutils/test/functional/expected/standalone_rst_html5.html 2021-06-30 07:48:44 UTC (rev 8786)
@@ -162,9 +162,9 @@
</ul>
</nav>
<section id="structural-elements">
-<h2><a class="toc-backref" href="#toc-entry-1"><span class="sectnum">1</span> Structural Elements</a></h2>
+<h2><a class="toc-backref" href="#toc-entry-1" role="doc-backlink"><span class="sectnum">1</span> Structural Elements</a></h2>
<section id="section-title">
-<h3 class="with-subtitle"><a class="toc-backref" href="#toc-entry-2"><span class="sectnum">1.1</span> Section Title</a></h3>
+<h3><a class="toc-backref" href="#toc-entry-2" role="doc-backlink"><span class="sectnum">1.1</span> Section Title</a></h3>
<p class="section-subtitle" id="section-subtitle">Section Subtitle</p>
<p>Lone subsections are converted to a section subtitle by a transform
activated with the <span class="docutils literal"><span class="pre">--section-subtitles</span></span> command line option or the
@@ -171,10 +171,10 @@
<span class="docutils literal"><span class="pre">sectsubtitle-xform</span></span> configuration value.</p>
</section>
<section id="empty-section">
-<h3><a class="toc-backref" href="#toc-entry-3"><span class="sectnum">1.2</span> Empty Section</a></h3>
+<h3><a class="toc-backref" href="#toc-entry-3" role="doc-backlink"><span class="sectnum">1.2</span> Empty Section</a></h3>
</section>
<section id="transitions">
-<h3><a class="toc-backref" href="#toc-entry-4"><span class="sectnum">1.3</span> Transitions</a></h3>
+<h3><a class="toc-backref" href="#toc-entry-4" role="doc-backlink"><span class="sectnum">1.3</span> Transitions</a></h3>
<p>Here's a transition:</p>
<hr class="docutils" />
<p>It divides the section. Transitions may also occur between sections:</p>
@@ -182,12 +182,12 @@
</section>
<hr class="docutils" />
<section id="body-elements">
-<h2><a class="toc-backref" href="#toc-entry-5"><span class="sectnum">2</span> Body Elements</a></h2>
+<h2><a class="toc-backref" href="#toc-entry-5" role="doc-backlink"><span class="sectnum">2</span> Body Elements</a></h2>
<section id="paragraphs">
-<h3><a class="toc-backref" href="#toc-entry-6"><span class="sectnum">2.1</span> Paragraphs</a></h3>
+<h3><a class="toc-backref" href="#toc-entry-6" role="doc-backlink"><span class="sectnum">2.1</span> Paragraphs</a></h3>
<p>A paragraph.</p>
<section id="inline-markup">
-<h4><a class="toc-backref" href="#toc-entry-7"><span class="sectnum">2.1.1</span> Inline Markup</a></h4>
+<h4><a class="toc-backref" href="#toc-entry-7" role="doc-backlink"><span class="sectnum">2.1.1</span> Inline Markup</a></h4>
<p>Paragraphs contain text and may contain inline markup: <em>emphasis</em>,
<strong>strong emphasis</strong>, <span class="docutils literal">inline literals</span>, standalone hyperlinks
(<a class="reference external" href="http://www.python.org">http://www.python.org</a>), external hyperlinks (<a class="reference external" href="http://www.python.org/">Python</a> <a class="footnote-reference brackets" href="#footnote-7" id="footnote-reference-18" role="doc-noteref"><span class="fn-bracket">[</span>7<span class="fn-bracket">]</span></a>), internal
@@ -216,7 +216,7 @@
</section>
</section>
<section id="bullet-lists">
-<h3><a class="toc-backref" href="#toc-entry-8"><span class="sectnum">2.2</span> Bullet Lists</a></h3>
+<h3><a class="toc-backref" href="#toc-entry-8" role="doc-backlink"><span class="sectnum">2.2</span> Bullet Lists</a></h3>
<ul>
<li><p>A bullet list</p>
<ul class="simple">
@@ -243,7 +243,7 @@
</ul>
</section>
<section id="enumerated-lists">
-<h3><a class="toc-backref" href="#toc-entry-9"><span class="sectnum">2.3</span> Enumerated Lists</a></h3>
+<h3><a class="toc-backref" href="#toc-entry-9" role="doc-backlink"><span class="sectnum">2.3</span> Enumerated Lists</a></h3>
<ol class="arabic">
<li><p>Arabic numerals.</p>
<ol class="loweralpha simple">
@@ -279,7 +279,7 @@
</ol>
</section>
<section id="definition-lists">
-<h3><a class="toc-backref" href="#toc-entry-10"><span class="sectnum">2.4</span> Definition Lists</a></h3>
+<h3><a class="toc-backref" href="#toc-entry-10" role="doc-backlink"><span class="sectnum">2.4</span> Definition Lists</a></h3>
<dl>
<dt>Term</dt>
<dd><p>Definition</p>
@@ -297,7 +297,7 @@
</dl>
</section>
<section id="field-lists">
-<h3><a class="toc-backref" href="#toc-entry-11"><span class="sectnum">2.5</span> Field Lists</a></h3>
+<h3><a class="toc-backref" href="#toc-entry-11" role="doc-backlink"><span class="sectnum">2.5</span> Field Lists</a></h3>
<dl class="field-list">
<dt>what<span class="colon">:</span></dt>
<dd><p>Field lists map field names to field bodies, like database
@@ -317,7 +317,7 @@
</dl>
</section>
<section id="option-lists">
-<h3><a class="toc-backref" href="#toc-entry-12"><span class="sectnum">2.6</span> Option Lists</a></h3>
+<h3><a class="toc-backref" href="#toc-entry-12" role="doc-backlink"><span class="sectnum">2.6</span> Option Lists</a></h3>
<p>For listing command-line options:</p>
<dl class="option-list">
<dt><kbd><span class="option">-a</span></kbd></dt>
@@ -356,7 +356,7 @@
description.</p>
</section>
<section id="literal-blocks">
-<h3><a class="toc-backref" href="#toc-entry-13"><span class="sectnum">2.7</span> Literal Blocks</a></h3>
+<h3><a class="toc-backref" href="#toc-entry-13" role="doc-backlink"><span class="sectnum">2.7</span> Literal Blocks</a></h3>
<p>Literal blocks are indicated with a double-colon ("::") at the end of
the preceding paragraph (over there <span class="docutils literal"><span class="pre">--></span></span>). They can be indented:</p>
<pre class="literal-block">if literal_block:
@@ -369,7 +369,7 @@
> Why didn't I think of that?</pre>
</section>
<section id="line-blocks">
-<h3><a class="toc-backref" href="#toc-entry-14"><span class="sectnum">2.8</span> Line Blocks</a></h3>
+<h3><a class="toc-backref" href="#toc-entry-14" role="doc-backlink"><span class="sectnum">2.8</span> Line Blocks</a></h3>
<p>This section tests line blocks. Line blocks are body elements which
consist of lines and other line blocks. Nested line blocks cause
indentation.</p>
@@ -443,7 +443,7 @@
</div>
</section>
<section id="block-quotes">
-<h3><a class="toc-backref" href="#toc-entry-15"><span class="sectnum">2.9</span> Block Quotes</a></h3>
+<h3><a class="toc-backref" href="#toc-entry-15" role="doc-backlink"><span class="sectnum">2.9</span> Block Quotes</a></h3>
<p>Block quotes consist of indented body elements:</p>
<blockquote>
<p>My theory by A. Elk. Brackets Miss, brackets. This theory goes
@@ -462,7 +462,7 @@
</blockquote>
</section>
<section id="doctest-blocks">
-<h3><a class="toc-backref" href="#toc-entry-16"><span class="sectnum">2.10</span> Doctest Blocks</a></h3>
+<h3><a class="toc-backref" href="#toc-entry-16" role="doc-backlink"><span class="sectnum">2.10</span> Doctest Blocks</a></h3>
<pre class="code python doctest">>>> print 'Python-specific usage examples; begun with ">>>"'
Python-specific usage examples; begun with ">>>"
>>> print '(cut and pasted from interactive Python sessions)'
@@ -470,7 +470,7 @@
</pre>
</section>
<section id="footnotes">
-<h3><a class="toc-backref" href="#toc-entry-17"><span class="sectnum">2.11</span> Footnotes</a></h3>
+<h3><a class="toc-backref" href="#toc-entry-17" role="doc-backlink"><span class="sectnum">2.11</span> Footnotes</a></h3>
<aside class="footnote brackets" id="footnote-1" role="note">
<span class="label"><span class="fn-bracket">[</span>1<span class="fn-bracket">]</span></span>
<span class="backrefs">(<a role="doc-backlink" href="#footnote-reference-1">1</a>,<a role="doc-backlink" href="#footnote-reference-5">2</a>,<a role="doc-backlink" href="#footnote-reference-9">3</a>)</span>
@@ -509,7 +509,7 @@
</aside>
</section>
<section id="citations">
-<h3><a class="toc-backref" href="#toc-entry-18"><span class="sectnum">2.12</span> Citations</a></h3>
+<h3><a class="toc-backref" href="#toc-entry-18" role="doc-backlink"><span class="sectnum">2.12</span> Citations</a></h3>
<div role="list" class="citation-list">
<div class="citation" id="cit2002" role="doc-biblioentry">
<span class="label"><span class="fn-bracket">[</span>CIT2002<span class="fn-bracket">]</span></span>
@@ -522,7 +522,7 @@
citation.</p>
</section>
<section id="targets">
-<span id="another-target"></span><h3><a class="toc-backref" href="#toc-entry-19"><span class="sectnum">2.13</span> Targets</a></h3>
+<span id="another-target"></span><h3><a class="toc-backref" href="#toc-entry-19" role="doc-backlink"><span class="sectnum">2.13</span> Targets</a></h3>
<p id="example">This paragraph is pointed to by the explicit "example" target. A
reference can be found under <a class="reference internal" href="#inline-markup">Inline Markup</a>, above. <a class="reference internal" href="#inline-hyperlink-targets">Inline
hyperlink targets</a> are also possible.</p>
@@ -535,13 +535,13 @@
<p>Here's a <a href="#system-message-4"><span class="problematic" id="problematic-2">`hyperlink reference without a target`_</span></a>, which generates an
error.</p>
<section id="duplicate-target-names">
-<h4><a class="toc-backref" href="#toc-entry-20"><span class="sectnum">2.13.1</span> Duplicate Target Names</a></h4>
+<h4><a class="toc-backref" href="#toc-entry-20" role="doc-backlink"><span class="sectnum">2.13.1</span> Duplicate Target Names</a></h4>
<p>Duplicate names in section headers or other implicit targets will
generate "info" (level-1) system messages. Duplicate names in
explicit targets will generate "warning" (level-2) system messages.</p>
</section>
<section id="duplicate-target-names-1">
-<h4><a class="toc-backref" href="#toc-entry-21"><span class="sectnum">2.13.2</span> Duplicate Target Names</a></h4>
+<h4><a class="toc-backref" href="#toc-entry-21" role="doc-backlink"><span class="sectnum">2.13.2</span> Duplicate Target Names</a></h4>
<p>Since there are two "Duplicate Target Names" section headers, we
cannot uniquely refer to either of them by name. If we try to (like
this: <a href="#system-message-5"><span class="problematic" id="problematic-3">`Duplicate Target Names`_</span></a>), an error is generated.</p>
@@ -548,7 +548,7 @@
</section>
</section>
<section id="directives">
-<h3><a class="toc-backref" href="#toc-entry-22"><span class="sectnum">2.14</span> Directives</a></h3>
+<h3><a class="toc-backref" href="#toc-entry-22" role="doc-backlink"><span class="sectnum">2.14</span> Directives</a></h3>
<nav class="contents local" id="contents">
<ul class="auto-toc simple">
<li><p><a class="reference internal" href="#document-parts" id="toc-entry-54"><span class="sectnum">2.14.1</span> Document Parts</a></p></li>
@@ -567,13 +567,13 @@
<p>These are just a sample of the many reStructuredText Directives. For
others, please see <a class="reference external" href="https://docutils.sourceforge.io/docs/ref/rst/directives.html">reStructuredText Directives</a> <a class="footnote-reference brackets" href="#footnote-14" id="footnote-reference-28" role="doc-noteref"><span class="fn-bracket">[</span>14<span class="fn-bracket">]</span></a>.</p>
<section id="document-parts">
-<h4><a class="toc-backref" href="#toc-entry-54"><span class="sectnum">2.14.1</span> Document Parts</a></h4>
+<h4><a class="toc-backref" href="#toc-entry-54" role="doc-backlink"><span class="sectnum">2.14.1</span> Document Parts</a></h4>
<p>An example of the "contents" directive can be seen above this section
(a local, untitled table of <a class="reference internal" href="#contents">contents</a>) and at the beginning of the
document (a document-wide <a class="reference internal" href="#table-of-contents">table of contents</a>).</p>
</section>
<section id="images-and-figures">
-<h4><a class="toc-backref" href="#toc-entry-55"><span class="sectnum">2.14.2</span> Images and Figures</a></h4>
+<h4><a class="toc-backref" href="#toc-entry-55" role="doc-backlink"><span class="sectnum">2.14.2</span> Images and Figures</a></h4>
<p>An image directive (also clickable -- a hyperlink reference):</p>
<a class="reference internal image-reference" href="#directives"><img alt="../../../docs/user/rst/images/title.png" class="class1 class2" src="../../../docs/user/rst/images/title.png" style="width: 70%;" /></a>
<p>Image with multiple IDs:</p>
@@ -671,7 +671,7 @@
upon the style sheet and the browser or rendering software used.</p>
</section>
<section id="tables">
-<h4><a class="toc-backref" href="#toc-entry-56"><span class="sectnum">2.14.3</span> Tables</a></h4>
+<h4><a class="toc-backref" href="#toc-entry-56" role="doc-backlink"><span class="sectnum">2.14.3</span> Tables</a></h4>
<p>Tables may be given titles and additional arguments with the <em>table</em>
directive:</p>
<table class="align-left">
@@ -765,7 +765,7 @@
</table>
</section>
<section id="admonitions">
-<h4><a class="toc-backref" href="#toc-entry-57"><span class="sectnum">2.14.4</span> Admonitions</a></h4>
+<h4><a class="toc-backref" href="#toc-entry-57" role="doc-backlink"><span class="sectnum">2.14.4</span> Admonitions</a></h4>
<aside class="admonition attention">
<p class="admonition-title">Attention!</p>
<p>Directives at large.</p>
@@ -814,7 +814,7 @@
</aside>
</section>
<section id="topics-sidebars-and-rubrics">
-<h4><a class="toc-backref" href="#toc-entry-58"><span class="sectnum">2.14.5</span> Topics, Sidebars, and Rubrics</a></h4>
+<h4><a class="toc-backref" href="#toc-entry-58" role="doc-backlink"><span class="sectnum">2.14.5</span> Topics, Sidebars, and Rubrics</a></h4>
<p><em>Sidebars</em> are like miniature, parallel documents.</p>
<aside class="sidebar">
<p class="sidebar-title">Optional Sidebar Title</p>
@@ -838,7 +838,7 @@
allowed (e.g. inside a directive).</p>
</section>
<section id="target-footnotes">
-<h4><a class="toc-backref" href="#toc-entry-59"><span class="sectnum">2.14.6</span> Target Footnotes</a></h4>
+<h4><a class="toc-backref" href="#toc-entry-59" role="doc-backlink"><span class="sectnum">2.14.6</span> Target Footnotes</a></h4>
<aside class="footnote brackets" id="footnote-7" role="note">
<span class="label"><span class="fn-bracket">[</span>7<span class="fn-bracket">]</span></span>
<span class="backrefs">(<a role="doc-backlink" href="#footnote-reference-18">1</a>,<a role="doc-backlink" href="#footnote-reference-19">2</a>,<a role="doc-backlink" href="#footnote-reference-20">3</a>,<a role="doc-backlink" href="#footnote-reference-26">4</a>)</span>
@@ -894,11 +894,11 @@
</aside>
</section>
<section id="replacement-text">
-<h4><a class="toc-backref" href="#toc-entry-60"><span class="sectnum">2.14.7</span> Replacement Text</a></h4>
+<h4><a class="toc-backref" href="#toc-entry-60" role="doc-backlink"><span class="sectnum">2.14.7</span> Replacement Text</a></h4>
<p>I recommend you try <a class="reference external" href="http://www.python.org/">Python, <em>the</em> best language around</a> <a class="footnote-reference brackets" href="#footnote-7" id="footnote-reference-20" role="doc-noteref"><span class="fn-bracket">[</span>7<span class="fn-bracket">]</span></a>.</p>
</section>
<section id="compound-paragraph">
-<h4><a class="toc-backref" href="#toc-entry-61"><span class="sectnum">2.14.8</span> Compound Paragraph</a></h4>
+<h4><a class="toc-backref" href="#toc-entry-61" role="doc-backlink"><span class="sectnum">2.14.8</span> Compound Paragraph</a></h4>
<p>The <em>compound</em> directive is used to create a "compound paragraph", which
is a single logical paragraph containing multiple physical body
elements. For example:</p>
@@ -1009,7 +1009,7 @@
</div>
</section>
<section id="parsed-literal-blocks">
-<h4><a class="toc-backref" href="#toc-entry-62"><span class="sectnum">2.14.9</span> Parsed Literal Blocks</a></h4>
+<h4><a class="toc-backref" href="#toc-entry-62" role="doc-backlink"><span class="sectnum">2.14.9</span> Parsed Literal Blocks</a></h4>
<pre class="literal-block">This is a parsed literal block.
This line is indented. The next line is blank.
@@ -1019,7 +1019,7 @@
footnotes <a class="footnote-reference brackets" href="#footnote-1" id="footnote-reference-9" role="doc-noteref"><span class="fn-bracket">[</span>1<span class="fn-bracket">]</span></a>, <span class="target" id="hyperlink-targets">hyperlink targets</span>, and <a class="reference external" href="http://www.python.org/">references</a>.</pre>
</section>
<section id="code">
-<h4><a class="toc-backref" href="#toc-entry-63"><span class="sectnum">2.14.10</span> Code</a></h4>
+<h4><a class="toc-backref" href="#toc-entry-63" role="doc-backlink"><span class="sectnum">2.14.10</span> Code</a></h4>
<p>Blocks of source code can be set with the <cite>code</cite> directive. If the code
language is specified, the content is parsed and tagged by the <a class="reference external" href="http://pygments.org/">Pygments</a> <a class="footnote-reference brackets" href="#footnote-8" id="footnote-reference-21" role="doc-noteref"><span class="fn-bracket">[</span>8<span class="fn-bracket">]</span></a>
syntax highlighter and can be formatted with a style sheet. (Code parsing
@@ -1044,19 +1044,19 @@
</code><small class="ln">2 </small><code data-lineno="2 ">.. footer:: Document footer</code></pre>
</section>
<section id="meta">
-<h4><a class="toc-backref" href="#toc-entry-64"><span class="sectnum">2.14.11</span> Meta</a></h4>
+<h4><a class="toc-backref" href="#toc-entry-64" role="doc-backlink"><span class="sectnum">2.14.11</span> Meta</a></h4>
<p>The <a class="reference external" href="https://docutils.sourceforge.io/docs/ref/rst/directives.html#metadata">“meta” directive</a> <a class="footnote-reference brackets" href="#footnote-15" id="footnote-reference-29" role="doc-noteref"><span class="fn-bracket">[</span>15<span class="fn-bracket">]</span></a> is used to specify metadata to be stored in,
e.g., HTML META tags or ODT file properties.</p>
</section>
</section>
<section id="substitution-definitions">
-<h3><a class="toc-backref" href="#toc-entry-34"><span class="sectnum">2.15</span> Substitution Definitions</a></h3>
+<h3><a class="toc-backref" href="#toc-entry-34" role="doc-backlink"><span class="sectnum">2.15</span> Substitution Definitions</a></h3>
<p>An inline image (<img alt="EXAMPLE" src="../../../docs/user/rst/images/biohazard.png" />) example:</p>
<p>A Unicode example:</p>
<p>(Substitution definitions are not visible in the HTML source.)</p>
</section>
<section id="comments">
-<h3><a class="toc-backref" href="#toc-entry-35"><span class="sectnum">2.16</span> Comments</a></h3>
+<h3><a class="toc-backref" href="#toc-entry-35" role="doc-backlink"><span class="sectnum">2.16</span> Comments</a></h3>
<p>Here's one:</p>
<!-- Comments begin with two dots and a space. Anything may
follow, except for the syntax of footnotes, hyperlink
@@ -1068,13 +1068,13 @@
<p>(View the HTML source to see the comment.)</p>
</section>
<section id="raw-text">
-<h3><a class="toc-backref" href="#toc-entry-36"><span class="sectnum">2.17</span> Raw text</a></h3>
+<h3><a class="toc-backref" href="#toc-entry-36" role="doc-backlink"><span class="sectnum">2.17</span> Raw text</a></h3>
<p>This does not necessarily look nice, because there may be missing white space.</p>
<p>It's just there to freeze the behavior.</p>
A test.Second test.<div class="myclass">Another test with myclass set.</div><p>This is the <span class="myrawroleclass">fourth test</span> with myrawroleclass set.</p>
Fifth test in HTML.<br />Line two.</section>
<section id="container">
-<h3><a class="toc-backref" href="#toc-entry-37"><span class="sectnum">2.18</span> Container</a></h3>
+<h3><a class="toc-backref" href="#toc-entry-37" role="doc-backlink"><span class="sectnum">2.18</span> Container</a></h3>
<div class="custom docutils container">
<p>paragraph 1</p>
<p>paragraph 2</p>
@@ -1081,7 +1081,7 @@
</div>
</section>
<section id="colspanning-tables">
-<h3><a class="toc-backref" href="#toc-entry-38"><span class="sectnum">2.19</span> Colspanning tables</a></h3>
+<h3><a class="toc-backref" href="#toc-entry-38" role="doc-backlink"><span class="sectnum">2.19</span> Colspanning tables</a></h3>
<p>This table has a cell spanning two columns:</p>
<table>
<colgroup>
@@ -1119,7 +1119,7 @@
</table>
</section>
<section id="rowspanning-tables">
-<h3><a class="toc-backref" href="#toc-entry-39"><span class="sectnum">2.20</span> Rowspanning tables</a></h3>
+<h3><a class="toc-backref" href="#toc-entry-39" role="doc-backlink"><span class="sectnum">2.20</span> Rowspanning tables</a></h3>
<p>Here's a table with cells spanning several rows:</p>
<table>
<colgroup>
@@ -1152,7 +1152,7 @@
</table>
</section>
<section id="complex-tables">
-<h3><a class="toc-backref" href="#toc-entry-40"><span class="sectnum">2.21</span> Complex tables</a></h3>
+<h3><a class="toc-backref" href="#toc-entry-40" role="doc-backlink"><span class="sectnum">2.21</span> Complex tables</a></h3>
<p>Here's a complex table, which should test all features.</p>
<table>
<colgroup>
@@ -1201,7 +1201,7 @@
</table>
</section>
<section id="list-tables">
-<h3><a class="toc-backref" href="#toc-entry-41"><span class="sectnum">2.22</span> List Tables</a></h3>
+<h3><a class="toc-backref" href="#toc-entry-41" role="doc-backlink"><span class="sectnum">2.22</span> List Tables</a></h3>
<p>Here's a list table exercising all features:</p>
<table class="colwidths-given test" style="width: 95%;">
<caption>list table with integral header</caption>
@@ -1248,7 +1248,7 @@
</table>
</section>
<section id="custom-roles">
-<h3><a class="toc-backref" href="#toc-entry-42"><span class="sectnum">2.23</span> Custom Roles</a></h3>
+<h3><a class="toc-backref" href="#toc-entry-42" role="doc-backlink"><span class="sectnum">2.23</span> Custom Roles</a></h3>
<ul>
<li><p>A role based on an existing role.</p>
<p><span class="custom docutils literal">one</span> <span class="custom docutils literal">two</span> <span class="custom docutils literal">three</span></p>
@@ -1278,7 +1278,7 @@
</section>
</section>
<section id="changes-to-the-html4css1-writer">
-<h2><a class="toc-backref" href="#toc-entry-43"><span class="sectnum">3</span> Changes to the <cite>html4css1</cite> Writer</a></h2>
+<h2><a class="toc-backref" href="#toc-entry-43" role="doc-backlink"><span class="sectnum">3</span> Changes to the <cite>html4css1</cite> Writer</a></h2>
<ul>
<li><p>Use only <a class="reference internal" href="#meta">meta</a> keywords recognized by HTML 5.
Add HTML5-compatible meta tags for docinfo items
@@ -1305,7 +1305,7 @@
(See <a class="reference internal" href="#text-level-semantics">text-level semantics</a> and <a class="reference internal" href="#indicating-edits">indicating edits</a>.)</p></li>
</ul>
<section id="field-list-rendering">
-<h3><a class="toc-backref" href="#toc-entry-44"><span class="sectnum">3.1</span> Field List Rendering</a></h3>
+<h3><a class="toc-backref" href="#toc-entry-44" role="doc-backlink"><span class="sectnum">3.1</span> Field List Rendering</a></h3>
<p>A <cite>field list</cite> is converted to a HTML <cite>definition list</cite> and given the
<span class="docutils literal"><span class="pre">field-list</span></span> class argument value to allow CSS styling.
With <span class="docutils literal">html_plain.css</span>, the layout is similar to <cite>html4css1</cite>:</p>
@@ -1329,11 +1329,11 @@
</dl>
</section>
<section id="styling-with-class-arguments">
-<h3><a class="toc-backref" href="#toc-entry-45"><span class="sectnum">3.2</span> Styling with Class Arguments</a></h3>
+<h3><a class="toc-backref" href="#toc-entry-45" role="doc-backlink"><span class="sectnum">3.2</span> Styling with Class Arguments</a></h3>
<p>The <span class="docutils literal">plain.css</span> style sheet comes with some pre-defined style variants
that can be choosen via a class argument.</p>
<section id="description-lists">
-<h4><a class="toc-backref" href="#toc-entry-46"><span class="sectnum">3.2.1</span> Description Lists</a></h4>
+<h4><a class="toc-backref" href="#toc-entry-46" role="doc-backlink"><span class="sectnum">3.2.1</span> Description Lists</a></h4>
<p>Definition lists with the "description" class argument:</p>
<dl class="description">
<dt>description lists</dt>
@@ -1372,7 +1372,7 @@
</dl>
</section>
<section id="details-disclosure-elements">
-<h4><a class="toc-backref" href="#toc-entry-47"><span class="sectnum">3.2.2</span> Details disclosure elements</a></h4>
+<h4><a class="toc-backref" href="#toc-entry-47" role="doc-backlink"><span class="sectnum">3.2.2</span> Details disclosure elements</a></h4>
<p>Items of <a class="reference internal" href="#definition-lists">definition lists</a> with class argument "details" are converted
to <a class="reference external" href="https://www.w3.org/TR/html52/interactive-elements.html#the-details-element">details</a> <a class="footnote-reference brackets" href="#footnote-9" id="footnote-reference-22" role="doc-noteref"><span class="fn-bracket">[</span>9<span class="fn-bracket">]</span></a> disclosure elements with the term becoming the "summary".</p>
<details>
@@ -1386,7 +1386,7 @@
</details>
</section>
<section id="field-list-variants">
-<h4><a class="toc-backref" href="#toc-entry-48"><span class="sectnum">3.2.3</span> Field List Variants</a></h4>
+<h4><a class="toc-backref" href="#toc-entry-48" role="doc-backlink"><span class="sectnum">3.2.3</span> Field List Variants</a></h4>
<p>For field lists, the "compact/open", "narrow" and "run-in" styles are defined
in the style sheets <span class="docutils literal">plain.css</span> and <span class="docutils literal">responsive.css</span>.</p>
<dl class="simple">
@@ -1467,7 +1467,7 @@
</dl>
</section>
<section id="table-variants">
-<h4><a class="toc-backref" href="#toc-entry-49"><span class="sectnum">3.2.4</span> Table Variants</a></h4>
+<h4><a class="toc-backref" href="#toc-entry-49" role="doc-backlink"><span class="sectnum">3.2.4</span> Table Variants</a></h4>
<p>The following styles can be applied to individual tables via a class
argument or as document wide setting with the <a class="reference external" href="http://docutils.sourceforge.net/docs/user/config.html#table-style">table-style</a> <a class="footnote-reference brackets" href="#footnote-10" id="footnote-reference-23" role="doc-noteref"><span class="fn-bracket">[</span>10<span class="fn-bracket">]</span></a> configuration
setting (or command line argument).</p>
@@ -1547,7 +1547,7 @@
</blockquote>
</section>
<section id="numbered-figures">
-<h4><a class="toc-backref" href="#toc-entry-50"><span class="sectnum">3.2.5</span> Numbered Figures</a></h4>
+<h4><a class="toc-backref" href="#toc-entry-50" role="doc-backlink"><span class="sectnum">3.2.5</span> Numbered Figures</a></h4>
<p>Numbered figures can be achieved with the "numbered" <span class="docutils literal">:figclass:</span> option:</p>
<figure class="numbered">
<img alt="reStructuredText, the markup syntax" src="../../../docs/user/rst/images/title.svg" style="width: 100%;" />
@@ -1558,7 +1558,7 @@
</section>
</section>
<section id="text-level-semantics">
-<h3><a class="toc-backref" href="#toc-entry-51"><span class="sectnum">3.3</span> Text-Level Semantics</a></h3>
+<h3><a class="toc-backref" href="#toc-entry-51" role="doc-backlink"><span class="sectnum">3.3</span> Text-Level Semantics</a></h3>
<p>This section describes the <a class="reference external" href="https://html.spec.whatwg.org/#text-level-semantics">HTML 5 tags for representation of text-level
semantics</a> <a class="footnote-reference brackets" href="#footnote-18" id="footnote-reference-32" role="doc-noteref"><span class="fn-bracket">[</span>18<span class="fn-bracket">]</span></a> and their reStructuredText equivalents.</p>
<dl class="description">
@@ -1766,7 +1766,7 @@
</aside>
</section>
<section id="indicating-edits">
-<h3><a class="toc-backref" href="#toc-entry-52"><span class="sectnum">3.4</span> Indicating Edits</a></h3>
+<h3><a class="toc-backref" href="#toc-entry-52" role="doc-backlink"><span class="sectnum">3.4</span> Indicating Edits</a></h3>
<p>The <a class="reference external" href="https://html.spec.whatwg.org/multipage/edits.html">HTML tags for representation of edits to the document</a> <a class="footnote-reference brackets" href="#footnote-19" id="footnote-reference-33" role="doc-noteref"><span class="fn-bracket">[</span>19<span class="fn-bracket">]</span></a> and their
reStructuredText equivalents are:</p>
<dl class="description">
@@ -1792,7 +1792,7 @@
</section>
</section>
<section id="error-handling">
-<h2><a class="toc-backref" href="#toc-entry-53"><span class="sectnum">4</span> Error Handling</a></h2>
+<h2><a class="toc-backref" href="#toc-entry-53" role="doc-backlink"><span class="sectnum">4</span> Error Handling</a></h2>
<p>Any errors caught during processing will generate system messages.</p>
<p>There should be five messages in the following, auto-generated
section, "Docutils System Messages":</p>
Deleted: trunk/docutils/test/functional/expected/video.html
===================================================================
--- trunk/docutils/test/functional/expected/video.html 2021-06-30 07:48:24 UTC (rev 8785)
+++ trunk/docutils/test/functional/expected/video.html 2021-06-30 07:48:44 UTC (rev 8786)
@@ -1,38 +0,0 @@
-<!DOCTYPE html>
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
-<meta charset="utf-8"/>
-<meta name="viewport" content="width=device-width, initial-scale=1" />
-<meta name="generator" content="Docutils 0.18b.dev: http://docutils.sourceforge.net/" />
-<title>Moving images (video)</title>
-<link rel="stylesheet" href="../input/data/minimal.css" type="text/css" />
-<link rel="stylesheet" href="../input/data/plain.css" type="text/css" />
-</head>
-<body>
-<main id="moving-images-video">
-<h1 class="title">Moving images (video)</h1>
-
-<p>If the URL given to <cite>images and figures</cite> hints to a video format
-supported by HTML 5 (MIME types 'video/mp4', 'video/webm', or
-'video/ogg'), the HTML5 writer will place it in a <a class="reference external" href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video">video element</a>.</p>
-<video class="align-left" src="../../../docs/user/rst/images/pens.mp4" title="left-aligned test video">
-<a href="../../../docs/user/rst/images/pens.mp4">left-aligned test video</a>
-</video>
-<p>A class option value "controls" tells the browser to display controls
-for video playback.</p>
-<p>It is a good idea to include width and height attributes. If
-height and width are not set, the page might flicker while the video
-loads. According to the <a class="reference external" href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video">HTML5 spec</a>, hight and width must be
-specified as pixel values.</p>
-<figure class="align-center">
-<video class="controls" controls="controls" src="../../../docs/user/rst/images/pens.mp4" title="../../../docs/user/rst/images/pens.mp4" width="30%">
-<a href="../../../docs/user/rst/images/pens.mp4">../../../docs/user/rst/images/pens.mp4</a>
-</video>
-<figcaption>
-<p>Simple test video in a centered figure</p>
-</figcaption>
-</figure>
-<p>A video like this <video src="../../../docs/user/rst/images/pens.mp4" title="testvideo" width="60"><a href="../../../docs/user/rst/images/pens.mp4">testvideo</a></video> can be included inline via substitution.</p>
-</main>
-</body>
-</html>
Copied: trunk/docutils/test/functional/input/data/embed_images.txt (from rev 8785, trunk/docutils/test/functional/input/embed_images.txt)
===================================================================
--- trunk/docutils/test/functional/input/data/embed_images.txt (rev 0)
+++ trunk/docutils/test/functional/input/data/embed_images.txt 2021-06-30 07:48:44 UTC (rev 8786)
@@ -0,0 +1,25 @@
+Embedded Images
+===============
+
+The "embed" flag tells Docutils that it should
+try to embed the image in the output document.
+
+If the image can be read from the local file system, it is base64_
+encoded and included as a `data URI`_.
+In future, SVG images may be directly inserted into HTML5.
+
+.. figure:: ../docs/user/rst/images/biohazard.png
+ :alt: biohazard
+ :align: center
+
+ Embedded image in a figure.
+
+
+Embedded inline image |inline-embedded| scaled to a height of 0.8 em.
+
+.. |inline-embedded| image:: ../docs/user/rst/images/biohazard.png
+ :height: 0.8 em
+
+.. _base64: https://en.wikipedia.org/wiki/Base64
+.. _data URI: https://en.wikipedia.org/wiki/Data_URI_scheme
+
Modified: trunk/docutils/test/functional/input/data/video.txt
===================================================================
--- trunk/docutils/test/functional/input/data/video.txt 2021-06-30 07:48:24 UTC (rev 8785)
+++ trunk/docutils/test/functional/input/data/video.txt 2021-06-30 07:48:44 UTC (rev 8786)
@@ -1,5 +1,5 @@
Moving images (video)
----------------------
+=====================
If the URL given to `images and figures` hints to a video format
supported by HTML 5 (MIME types 'video/mp4', 'video/webm', or
@@ -18,14 +18,16 @@
specified as pixel values.
.. figure:: ../../../docs/user/rst/images/pens.mp4
- :width: 30%
+ :width: 200px
:align: center
:class: controls
+ :alt: test video in a figure
Simple test video in a centered figure
.. |testvideo| image:: ../../../docs/user/rst/images/pens.mp4
:width: 60 px
+ :alt: rotating pens video
A video like this |testvideo| can be included inline via substitution.
Deleted: trunk/docutils/test/functional/input/embed_images.txt
===================================================================
--- trunk/docutils/test/functional/input/embed_images.txt 2021-06-30 07:48:24 UTC (rev 8785)
+++ trunk/docutils/test/functional/input/embed_images.txt 2021-06-30 07:48:44 UTC (rev 8786)
@@ -1,25 +0,0 @@
-Embedded Images
----------------
-
-The "embed" flag tells Docutils that it should
-try to embed the image in the output document.
-
-If the image can be read from the local file system, it is base64_
-encoded and included as a `data URI`_.
-In future, SVG images may be directly inserted into HTML5.
-
- .. figure:: ../docs/user/rst/images/biohazard.svg
- :alt: biohazard
- :align: center
-
- SVG image embedded in a figure.
-
-
-Embedded inline image |inline-embedded| scaled to a height of 0.8 em.
-
- .. |inline-embedded| image:: ../docs/user/rst/images/biohazard.png
- :height: 0.8 em
-
-.. _base64: https://en.wikipedia.org/wiki/Base64
-.. _data URI: https://en.wikipedia.org/wiki/Data_URI_scheme
-
Added: trunk/docutils/test/functional/input/misc_rst_html5.txt
===================================================================
--- trunk/docutils/test/functional/input/misc_rst_html5.txt (rev 0)
+++ trunk/docutils/test/functional/input/misc_rst_html5.txt 2021-06-30 07:48:44 UTC (rev 8786)
@@ -0,0 +1,7 @@
+============================
+Additional tests with HTML 5
+============================
+
+.. include:: data/section_titles.txt
+.. include:: data/embed_images.txt
+.. include:: data/video.txt
Property changes on: trunk/docutils/test/functional/input/misc_rst_html5.txt
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Revision
\ No newline at end of property
Deleted: trunk/docutils/test/functional/tests/embed_images_html5.py
===================================================================
--- trunk/docutils/test/functional/tests/embed_images_html5.py 2021-06-30 07:48:24 UTC (rev 8785)
+++ trunk/docutils/test/functional/tests/embed_images_html5.py 2021-06-30 07:48:44 UTC (rev 8786)
@@ -1,18 +0,0 @@
-with open('functional/tests/_standalone_rst_defaults.py') as _f:
- exec(_f.read())
-
-# Source and destination file names.
-test_source = "embed_images.txt"
-test_destination = "embed_images_html5.html"
-
-# Keyword parameters passed to publish_file.
-writer_name = "html5"
-
-# Settings:
-settings_overrides['smart_quotes'] = 'yes'
-settings_overrides['embed_images'] = 'yes'
-
-# local copy of stylesheets:
-# (Test runs in ``docutils/test/``, we need relative path from there.)
-settings_overrides['stylesheet_dirs'] = ('.', 'functional/input/data')
-
Deleted: trunk/docutils/test/functional/tests/html5_video.py
===================================================================
--- trunk/docutils/test/functional/tests/html5_video.py 2021-06-30 07:48:24 UTC (rev 8785)
+++ trunk/docutils/test/functional/tests/html5_video.py 2021-06-30 07:48:44 UTC (rev 8786)
@@ -1,14 +0,0 @@
-with open('functional/tests/_standalone_rst_defaults.py') as _f:
- exec(_f.read())
-
-# Source and destination file names.
-test_source = "data/video.txt"
-test_destination = "video.html"
-
-# Keyword parameters passed to publish_file.
-writer_name = "html5"
-
-# Settings:
-# local copy of stylesheets:
-# (Test runs in ``docutils/test/``, we need relative path from there.)
-settings_overrides['stylesheet_dirs'] = ('.', 'functional/input/data')
Added: trunk/docutils/test/functional/tests/misc_rst_html5.py
===================================================================
--- trunk/docutils/test/functional/tests/misc_rst_html5.py (rev 0)
+++ trunk/docutils/test/functional/tests/misc_rst_html5.py 2021-06-30 07:48:44 UTC (rev 8786)
@@ -0,0 +1,13 @@
+# Source and destination file names.
+test_source = "misc_rst_html5.txt"
+test_destination = "misc_rst_html5.html"
+
+# Keyword parameters passed to publish_file.
+reader_name = "standalone"
+parser_name = "rst"
+writer_name = "html5"
+
+# Settings
+settings_overrides['smart_quotes'] = 'yes'
+settings_overrides['embed_images'] = 'yes'
+settings_overrides['embed_stylesheet'] = False
Property changes on: trunk/docutils/test/functional/tests/misc_rst_html5.py
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Revision
\ No newline at end of property
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|