mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #8289: Allow to suppress "duplicated ToC entry found" warnings from epub builder
This commit is contained in:
parent
a8abb9995f
commit
3eecf133d8
2
CHANGES
2
CHANGES
@ -26,6 +26,8 @@ Features added
|
|||||||
just before writing .tex file
|
just before writing .tex file
|
||||||
* #7996: manpage: Add :confval:`man_make_section_directory` to make a section
|
* #7996: manpage: Add :confval:`man_make_section_directory` to make a section
|
||||||
directory on build man page
|
directory on build man page
|
||||||
|
* #8289: Allow to suppress "duplicated ToC entry found" warnings from epub builder
|
||||||
|
using :confval:`suppress_warnings`.
|
||||||
|
|
||||||
Bugs fixed
|
Bugs fixed
|
||||||
----------
|
----------
|
||||||
|
@ -316,6 +316,7 @@ General configuration
|
|||||||
* ``toc.circular``
|
* ``toc.circular``
|
||||||
* ``toc.secnum``
|
* ``toc.secnum``
|
||||||
* ``epub.unknown_project_files``
|
* ``epub.unknown_project_files``
|
||||||
|
* ``epub.duplicated_toc_entry``
|
||||||
* ``autosectionlabel.*``
|
* ``autosectionlabel.*``
|
||||||
|
|
||||||
You can choose from these types.
|
You can choose from these types.
|
||||||
@ -340,6 +341,11 @@ General configuration
|
|||||||
|
|
||||||
Added ``autosectionlabel.*``
|
Added ``autosectionlabel.*``
|
||||||
|
|
||||||
|
|
||||||
|
.. versionchanged:: 3.3.0
|
||||||
|
|
||||||
|
Added ``epub.duplicated_toc_entry``
|
||||||
|
|
||||||
.. confval:: needs_sphinx
|
.. confval:: needs_sphinx
|
||||||
|
|
||||||
If set to a ``major.minor`` version string like ``'1.1'``, Sphinx will
|
If set to a ``major.minor`` version string like ``'1.1'``, Sphinx will
|
||||||
|
@ -208,7 +208,12 @@ class EpubBuilder(StandaloneHTMLBuilder):
|
|||||||
appeared = set() # type: Set[str]
|
appeared = set() # type: Set[str]
|
||||||
for node in nodes:
|
for node in nodes:
|
||||||
if node['refuri'] in appeared:
|
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:
|
else:
|
||||||
appeared.add(node['refuri'])
|
appeared.add(node['refuri'])
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user