Fix traceback with `only` directives preceded by targets.

This commit is contained in:
Georg Brandl committed 2011-01-06 12:50:14 +01:00
1 parent 81ecbc19b0
commit 400e1a7fa8
2 files changed
+5 -1

No files matched your search

+2
View File
@@ -1,6 +1,8 @@
Release 1.0.7 (in development)
==============================
* Fix traceback with ``only`` directives preceded by targets.
* Fix tracebacks occurring for duplicate C++ domain objects.
+3 -1
View File
@@ -1363,7 +1363,9 @@ class BuildEnvironment:
if ret:
node.replace_self(node.children)
else:
node.replace_self([])
# replacing by [] would result in an "Losing ids" exception
# if there is a target node before the only node
node.replace_self(nodes.comment())
# allow custom references to be resolved
builder.app.emit('doctree-resolved', doctree, fromdocname)