mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix RuntimeError with numbered circular toctree
This commit is contained in:
parent
ba5a42c504
commit
2ccdebf5d9
@ -1699,6 +1699,7 @@ class BuildEnvironment:
|
|||||||
|
|
||||||
rewrite_needed = []
|
rewrite_needed = []
|
||||||
|
|
||||||
|
assigned = set()
|
||||||
old_fignumbers = self.toc_fignumbers
|
old_fignumbers = self.toc_fignumbers
|
||||||
self.toc_fignumbers = {}
|
self.toc_fignumbers = {}
|
||||||
fignum_counter = {}
|
fignum_counter = {}
|
||||||
@ -1745,8 +1746,10 @@ class BuildEnvironment:
|
|||||||
_walk_doctree(docname, subnode, secnum)
|
_walk_doctree(docname, subnode, secnum)
|
||||||
|
|
||||||
def _walk_doc(docname, secnum):
|
def _walk_doc(docname, secnum):
|
||||||
doctree = self.get_doctree(docname)
|
if docname not in assigned:
|
||||||
_walk_doctree(docname, doctree, secnum)
|
assigned.add(docname)
|
||||||
|
doctree = self.get_doctree(docname)
|
||||||
|
_walk_doctree(docname, doctree, secnum)
|
||||||
|
|
||||||
if self.config.numfig:
|
if self.config.numfig:
|
||||||
_walk_doc(self.config.master_doc, tuple())
|
_walk_doc(self.config.master_doc, tuple())
|
||||||
|
Loading…
Reference in New Issue
Block a user