Skip to content

Commit

Permalink
Merge pull request #8071 from asmeurer/self-reference-warning-type
Browse files Browse the repository at this point in the history
Make the toc.circular suppress_warnings flag apply to self referenced toctrees
  • Loading branch information
tk0miya committed Aug 8, 2020
2 parents f92fa64 + 2a59fbc commit b2d3f06
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sphinx/environment/__init__.py
Expand Up @@ -594,7 +594,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 b2d3f06

Please sign in to comment.