You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix handling of target elements in rst; fixes#1680.
All Docutils elements with "ids" attribute can serve as internal target.
The "ids" attribute is indirectly specified, via the rST "refname"
(in a preceding *empty* target `.. _refname:` or as "name" option in
rST directives).
This means:
* Not all elements with ID have a matching <target> element.
* If rST `<target>` elements refer to another element
(via the "refid", "refuri", or "refname" attribute),
they can be safely ignored.
Add an optional argument "node" to `rst_in.NodeVisitor.open_moin_page_node()`
Every ID of the passed Docutils node adds an empty `<span>` with the ID.
(IDs on the "moinpage node" would be prefereable but may don't always reach
the HTML and don't survive an rST -> rST round-trip.)
Use an "attention" type admonition for the "generic admonition".
Add/Update test cases.
TODO: some IDs are still dropped.
'<page><body><p><a xlink:href="wiki.local:Whitespace%20is%20normalized%20&%20Case%20is%20KEPT.">Whitespace is\nnormalized & Case is KEPT.</a></p></body></page>',
228
237
),
229
-
( # in rST, matching the reference text is case insensitive:
238
+
( # in rST, reference-name matching is case insensitive:
230
239
"Chapter 1\n===============\n\nA reference to `chapter 1`_.\n",
231
240
'<page><body><h outline-level="1">Chapter 1</h><p>A reference to <a xlink:href="wiki.local:#Chapter_1">chapter 1</a>.</p></body></page>',
'<page><body><table><table-header><table-row><table-cell><p>AAAAAAAAAAAAAAAAAA</p></table-cell><table-cell><p>BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB</p></table-cell></table-row></table-header><table-body><table-row><table-cell number-rows-spanned="2"><p>cell spanning 2 rows</p></table-cell><table-cell><p>cell in the 2nd column</p></table-cell></table-row><table-row><table-cell><p>cell in the 2nd column of the 2nd row</p></table-cell></table-row><table-row><table-cell number-columns-spanned="2"><p>test</p></table-cell></table-row><table-row><table-cell number-columns-spanned="2"><p>test</p></table-cell></table-row></table-body></table></body></page>',
0 commit comments