summaryrefslogtreecommitdiff
path: root/sphinx
diff options
context:
space:
mode:
authorThomas Grainger <tagrain@gmail.com>2020-10-05 09:29:16 +0100
committerThomas Grainger <tagrain@gmail.com>2020-10-05 09:29:16 +0100
commit3eecf133d8a8af2f22f6f122d3245a1e2db940eb (patch)
treee1c8ef12ebd566b938a62a87435493f96513b3b3 /sphinx
parenta8abb9995f71b9bc02b6f83592751c779ae0f75a (diff)
downloadsphinx-git-3eecf133d8a8af2f22f6f122d3245a1e2db940eb.tar.gz
Fix #8289: Allow to suppress "duplicated ToC entry found" warnings from epub builder
Diffstat (limited to 'sphinx')
-rw-r--r--sphinx/builders/_epub_base.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/sphinx/builders/_epub_base.py b/sphinx/builders/_epub_base.py
index 95f9ab8ed..b126182e9 100644
--- a/sphinx/builders/_epub_base.py
+++ b/sphinx/builders/_epub_base.py
@@ -208,7 +208,12 @@ class EpubBuilder(StandaloneHTMLBuilder):
appeared = set() # type: Set[str]
for node in nodes:
if node['refuri'] in appeared:
- logger.warning(__('duplicated ToC entry found: %s'), node['refuri'])
+ logger.warning(
+ __('duplicated ToC entry found: %s'),
+ node['refuri'],
+ type="epub",
+ subtype="duplicated_toc_entry",
+ )
else:
appeared.add(node['refuri'])