mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-10-12 08:25:01 -05:00
Fix traceback with `only` directives preceded by targets.
This commit is contained in:
1 parent
81ecbc19b0
commit
400e1a7fa8
2 files changed
+5
-1
No files matched your search
@@ -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.
|
||||
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user