mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-09-03 20:52:55 -05:00
Fix #3214: Allow to suppress "unknown mimetype" warnings from epub builder
This commit is contained in:
@@ -1,6 +1,12 @@
|
|||||||
Release 1.5.1 (in development)
|
Release 1.5.1 (in development)
|
||||||
==============================
|
==============================
|
||||||
|
|
||||||
|
Features added
|
||||||
|
--------------
|
||||||
|
|
||||||
|
* #3214: Allow to suppress "unknown mimetype" warnings from epub builder using
|
||||||
|
:confval:`suppress_warnings`.
|
||||||
|
|
||||||
Bugs fixed
|
Bugs fixed
|
||||||
----------
|
----------
|
||||||
|
|
||||||
|
|||||||
@@ -233,6 +233,7 @@ General configuration
|
|||||||
* ref.citation
|
* ref.citation
|
||||||
* ref.doc
|
* ref.doc
|
||||||
* misc.highlighting_failure
|
* misc.highlighting_failure
|
||||||
|
* epub.unknown_project_files
|
||||||
|
|
||||||
You can choose from these types.
|
You can choose from these types.
|
||||||
|
|
||||||
@@ -244,6 +245,10 @@ General configuration
|
|||||||
|
|
||||||
Added ``misc.highlighting_failure``
|
Added ``misc.highlighting_failure``
|
||||||
|
|
||||||
|
.. versionchanged:: 1.5.1
|
||||||
|
|
||||||
|
Added ``epub.unknown_project_files``
|
||||||
|
|
||||||
.. 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
|
||||||
|
|||||||
@@ -584,7 +584,8 @@ class EpubBuilder(StandaloneHTMLBuilder):
|
|||||||
# we always have JS and potentially OpenSearch files, don't
|
# we always have JS and potentially OpenSearch files, don't
|
||||||
# always warn about them
|
# always warn about them
|
||||||
if ext not in ('.js', '.xml'):
|
if ext not in ('.js', '.xml'):
|
||||||
self.warn('unknown mimetype for %s, ignoring' % filename)
|
self.warn('unknown mimetype for %s, ignoring' % filename,
|
||||||
|
type='epub', subtype='unknown_project_files')
|
||||||
continue
|
continue
|
||||||
filename = filename.replace(os.sep, '/')
|
filename = filename.replace(os.sep, '/')
|
||||||
projectfiles.append(self.file_template % {
|
projectfiles.append(self.file_template % {
|
||||||
|
|||||||
Reference in New Issue
Block a user