Fix handling of target elements in rst; fixes #1680. #2006
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
<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.