From: Vladimír Vondruš Date: Tue, 4 Jan 2022 13:06:08 +0000 (+0100) Subject: m.htmlsanity, m.components: expand transition tests. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=6693d2dd1245cac95e8df784923fa4b3f3af1558;p=blog.git m.htmlsanity, m.components: expand transition tests. The m.css .. transition:: directive should behave the same as builtin transitions, but it doesn't. Fix in the next commit. --- diff --git a/plugins/m/test/components/page.html b/plugins/m/test/components/page.html index b5ba3435..4f9d5d85 100644 --- a/plugins/m/test/components/page.html +++ b/plugins/m/test/components/page.html @@ -85,6 +85,28 @@ Second text.

Inline elements: Primary label, 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:

+

~ * ~ * ~

+

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.

+
+

~ * ~ * ~

+
+

Section after

+

Docutils says "Document may not end with a transition", eh.

+
diff --git a/plugins/m/test/components/page.rst b/plugins/m/test/components/page.rst index c4793737..de57d8ce 100644 --- a/plugins/m/test/components/page.rst +++ b/plugins/m/test/components/page.rst @@ -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. diff --git a/plugins/m/test/htmlsanity_content/page.html b/plugins/m/test/htmlsanity_content/page.html index 43233507..a9b3ce79 100644 --- a/plugins/m/test/htmlsanity_content/page.html +++ b/plugins/m/test/htmlsanity_content/page.html @@ -30,6 +30,7 @@
  • Section title with link
  • +
  • Section after
  • A paragraph.

    @@ -97,11 +98,17 @@ reference on a single thing 1 and +
    +
    +

    Section after

    +

    Docutils says "Document may not end with a transition", eh.

    +
    diff --git a/plugins/m/test/htmlsanity_content/page.rst b/plugins/m/test/htmlsanity_content/page.rst index 393206d6..58c9818a 100644 --- a/plugins/m/test/htmlsanity_content/page.rst +++ b/plugins/m/test/htmlsanity_content/page.rst @@ -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.