chiark / gitweb /
m.htmlsanity, m.components: expand transition tests.
authorVladimír Vondruš <mosra@centrum.cz>
Tue, 4 Jan 2022 13:06:08 +0000 (14:06 +0100)
committerVladimír Vondruš <mosra@centrum.cz>
Tue, 4 Jan 2022 13:08:26 +0000 (14:08 +0100)
The m.css .. transition:: directive should behave the same as builtin
transitions, but it doesn't. Fix in the next commit.

plugins/m/test/components/page.html
plugins/m/test/components/page.rst
plugins/m/test/htmlsanity_content/page.html
plugins/m/test/htmlsanity_content/page.rst

index b5ba3435157004136b13b5486fbe88310cc3ce94..4f9d5d8542fa8ffe1f66d38fbacd0f29fe76e86b 100644 (file)
@@ -85,6 +85,28 @@ Second text.</div>
 </div>
 <p>Inline elements: <span class="m-label m-primary">Primary label</span>,
 <span class="m-label m-flat m-warning">Flat warning label</span>.</p>
+<section id="transitions-builtin">
+<h2><a href="#transitions-builtin">Transitions, builtin</a></h2>
+<p>Builtin transition in the middle of a section, stays inside the section node:</p>
+<hr />
+<p>Builtin transition at the end of a section, gets extracted outside of the
+section node. Clicking on the section header will not include it in the
+highlight.</p>
+</section>
+<hr />
+<section id="transitions-m-css">
+<h2><a href="#transitions-m-css">Transitions, m.css</a></h2>
+<p>M.css transition in the middle of a section, stays inside the section node:</p>
+<p class="m-transition">~ * ~ * ~</p>
+<p>M.css transition at the end of a section, gets extracted outside of the section
+node the same as a builtin transition. Clicking on the section header will not
+include it in the highlight.</p>
+</section>
+<p class="m-transition">~ * ~ * ~</p>
+<section id="section-after">
+<h2>Section after</h2>
+<p>Docutils says &quot;Document may not end with a transition&quot;, eh.</p>
+</section>
 <!-- /content -->
       </div>
     </div>
index c479373718b3fd2e43f7360bc7228fb30041ca10..de57d8ce1679d349990ca469fd2627e1c201db6e 100644 (file)
@@ -95,3 +95,34 @@ m.components
 
 Inline elements: :label-primary:`Primary label`,
 :label-flat-warning:`Flat warning label`.
+
+`Transitions, builtin`_
+=======================
+
+Builtin transition in the middle of a section, stays inside the section node:
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Builtin transition at the end of a section, gets extracted outside of the
+section node. Clicking on the section header will not include it in the
+highlight.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+`Transitions, m.css`_
+=====================
+
+M.css transition in the middle of a section, stays inside the section node:
+
+.. transition:: ~ * ~ * ~
+
+M.css transition at the end of a section, gets extracted outside of the section
+node the same as a builtin transition. Clicking on the section header will not
+include it in the highlight.
+
+.. transition:: ~ * ~ * ~
+
+Section after
+=============
+
+Docutils says "Document may not end with a transition", eh.
index 432335070caa118e19607df32a8d96c835c4e166..a9b3ce794b575d9b6482fc9a2fdd5fa67963493f 100644 (file)
@@ -30,6 +30,7 @@
 <li><a href="#section-title-with-link" id="id7">Section title with link</a></li>
 </ul>
 </li>
+<li><a href="#section-after" id="id8">Section after</a></li>
 </ul>
 </aside>
 <p>A paragraph.</p>
@@ -97,11 +98,17 @@ reference on a single thing <a class="m-footnote" href="#id4" id="id1">1</a> and
 </div>
 <section id="section-title-with-link">
 <h3><a href="#section-title-with-link">Section title with link</a></h3>
-<p>A line:</p>
+<p>A line in the middle of a section, stays inside the section node:</p>
 <hr />
-<p>And a paragraph after.</p>
+<p>A line at the end of a section, gets extracted outside of the section node.
+Clicking on the section header will not include it in the highlight.</p>
 </section>
 </section>
+<hr />
+<section id="section-after">
+<h2><a href="#id8">Section after</a></h2>
+<p>Docutils says &quot;Document may not end with a transition&quot;, eh.</p>
+</section>
 <!-- /content -->
       </div>
     </div>
index 393206d65d09f6e5f108fea977a8a12509e81f3f..58c9818a1bd24daf964df0ed01996850634b2ba4 100644 (file)
@@ -72,8 +72,16 @@ reference on a single thing [1]_ and more things [1]_ [2]_
 `Section title with link`_
 --------------------------
 
-A line:
+A line in the middle of a section, stays inside the section node:
 
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-And a paragraph after.
+A line at the end of a section, gets extracted outside of the section node.
+Clicking on the section header will not include it in the highlight.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Section after
+=============
+
+Docutils says "Document may not end with a transition", eh.