When copying toc tree, 'only' nodes should not be copied, but previous implementation always considered 'only' node children as duplicable nodes which is wrong when 'only' nodes is parent of other 'only' nodes.
Subject: Fix _toctree_copy with multi level 'only' nodes.
Feature or Bugfix
Bugfix
Purpose
When copying toc tree, 'only' nodes should not be copied, but previous implementation always considered 'only' node children as duplicable nodes which is wrong when 'only' nodes is parent of other 'only' nodes.
Detail
Split _toctree_copy function in two parts:
_toctree_copy duplicate nodes as previously but duplicates its children using the next function.
_toctree_copy_children handle each node children and takes the decision about copying current node or not. In 'only' node case, this function is called recursively.
When copying toc tree, 'only' nodes should not be copied, but previous implementation always considered 'only' node children as duplicable nodes which is wrong when 'only' nodes is parent of other 'only' nodes.
Subject: Fix _toctree_copy with multi level 'only' nodes.
Feature or Bugfix
Purpose
When copying toc tree, 'only' nodes should not be copied, but previous implementation always considered 'only' node children as duplicable nodes which is wrong when 'only' nodes is parent of other 'only' nodes.
Detail
Split
_toctree_copy
function in two parts:_toctree_copy
duplicate nodes as previously but duplicates its children using the next function._toctree_copy_children
handle each node children and takes the decision about copying current node or not. In 'only' node case, this function is called recursively.Relates
13022