sphinx-doc / sphinx

The Sphinx documentation generator
https://www.sphinx-doc.org/
Other
6.61k stars 2.13k forks source link

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

Open ArnaudD-FR opened 1 week ago

ArnaudD-FR commented 1 week ago

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:

Relates