Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix _toctree_copy with multi level 'only' nodes. #13133

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ArnaudD-FR
Copy link

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.

Relates

…des.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant