summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Meurer <asmeurer@gmail.com>2020-08-07 15:38:28 -0600
committerAaron Meurer <asmeurer@gmail.com>2020-08-07 15:42:41 -0600
commit2a59fbcdbeb9a623173c465b0f46335df86a05fb (patch)
treee1df2668d5dea65c938b9275d87d98f47217c342
parentf92fa6443fe6f457ab0c26d41eb229e825fda5e1 (diff)
downloadsphinx-git-2a59fbcdbeb9a623173c465b0f46335df86a05fb.tar.gz
Make the toc.circular suppress_warnings flag apply to self referenced toctrees
Fixes https://github.com/sphinx-doc/sphinx/issues/7410#issuecomment-670678193.
-rw-r--r--sphinx/environment/__init__.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/sphinx/environment/__init__.py b/sphinx/environment/__init__.py
index cf3364494..8ce9fa365 100644
--- a/sphinx/environment/__init__.py
+++ b/sphinx/environment/__init__.py
@@ -594,7 +594,9 @@ class BuildEnvironment:
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