class PropagateTargets(Transform):
Propagate empty internal targets to the next element.
Given the following nodes:
<target ids="internal1" names="internal1"> <target anonymous="1" ids="id1"> <target ids="internal2" names="internal2"> <paragraph> This is a test.
PropagateTargets propagates the ids and names of the internal targets preceding the paragraph to the paragraph itself:
<target refid="internal1"> <target anonymous="1" refid="id1"> <target refid="internal2"> <paragraph ids="internal2 id1 internal1" names="internal2 internal1"> This is a test.
Method | apply |
Override to apply the transform to the document tree. |
Class Variable | default​_priority |
Numerical priority of this transform, 0 through 999 (override). |
Inherited from Transform
:
Method | __init__ |
Initial setup for in-place document transforms. |
Instance Variable | document |
The document tree to transform. |
Instance Variable | language |
Language module local to this document. |
Instance Variable | startnode |
Node from which to begin the transform. For many transforms which apply to the document as a whole, startnode is not set (i.e. its value is None ). |
docutils.transforms.Transform.apply