Skip to content

Commit

Permalink
Make the toc.circular suppress_warnings flag apply to self referenced…
Browse files Browse the repository at this point in the history
… toctrees

Fixes #7410 (comment).
  • Loading branch information
asmeurer committed Aug 7, 2020
1 parent 9969239 commit 70b0d26
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sphinx/environment/__init__.py
Expand Up @@ -584,7 +584,9 @@ def collect_relations(self) -> Dict[str, List[str]]:

def traverse_toctree(parent: str, docname: str) -> Iterator[Tuple[str, str]]:
if parent == docname:
logger.warning(__('self referenced toctree found. Ignored.'), location=docname)
logger.warning(__('self referenced toctree found. Ignored.'),
location=docname, type='toc',
subtype='circular')
return

# traverse toctree by pre-order
Expand Down

0 comments on commit 70b0d26

Please sign in to comment.