summaryrefslogtreecommitdiff
path: root/docutils/transforms
diff options
context:
space:
mode:
authorwiemann <wiemann@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2005-02-27 01:00:59 +0000
committerwiemann <wiemann@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2005-02-27 01:00:59 +0000
commit6e194ab6b0f7b77f7c8edf53730f52bd8ce5f4a1 (patch)
tree2deccea61dbcd4fdb1606ae43054cd5327881804 /docutils/transforms
parentd0042a179d7074b411890bdb80d17513dc43c335 (diff)
downloaddocutils-6e194ab6b0f7b77f7c8edf53730f52bd8ce5f4a1.tar.gz
when relocating a target, it now acquires the children of its new parent;
fixed bug in recording internal targets so that anonymous targets are relocated as well git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@2996 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils/transforms')
-rw-r--r--docutils/transforms/references.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/docutils/transforms/references.py b/docutils/transforms/references.py
index 8fda16c77..c8989f2a6 100644
--- a/docutils/transforms/references.py
+++ b/docutils/transforms/references.py
@@ -448,7 +448,10 @@ class InternalTargets(Transform):
element.walk(visitor)
except nodes.NodeFound:
target.parent.remove(target)
- visitor.found.insert(0, target)
+ for child in visitor.found:
+ target += child
+ visitor.found.children = []
+ visitor.found += target
return
else:
# At end of section or container; try parent's sibling