diff options
| author | Aaron Meurer <asmeurer@gmail.com> | 2020-08-07 15:38:28 -0600 |
|---|---|---|
| committer | Aaron Meurer <asmeurer@gmail.com> | 2020-08-07 15:42:41 -0600 |
| commit | 2a59fbcdbeb9a623173c465b0f46335df86a05fb (patch) | |
| tree | e1df2668d5dea65c938b9275d87d98f47217c342 | |
| parent | f92fa6443fe6f457ab0c26d41eb229e825fda5e1 (diff) | |
| download | sphinx-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__.py | 4 |
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 |
