mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #4720: message when an image is mismatched for builder is not clear
This commit is contained in:
1
CHANGES
1
CHANGES
@@ -27,6 +27,7 @@ Bugs fixed
|
||||
* #4725: Sphinx does not work with python 3.5.0 and 3.5.1
|
||||
* #4716: Generation PDF file with TexLive on Windows, file not found error
|
||||
* #4574: vertical space before equation in latex
|
||||
* #4720: message when an image is mismatched for builder is not clear
|
||||
|
||||
Testing
|
||||
--------
|
||||
|
@@ -211,9 +211,14 @@ class Builder(object):
|
||||
if candidate:
|
||||
break
|
||||
else:
|
||||
logger.warning('no matching candidate for image URI %r',
|
||||
images.get_original_image_uri(node['uri']),
|
||||
location=node)
|
||||
mimetypes = sorted(node['candidates'])
|
||||
image_uri = images.get_original_image_uri(node['uri'])
|
||||
if mimetypes:
|
||||
logger.warning('a suitable image for %s builder not found: %s (%s)',
|
||||
self.name, mimetypes, image_uri, location=node)
|
||||
else:
|
||||
logger.warning('a suitable image for %s builder not found: %s',
|
||||
self.name, image_uri, location=node)
|
||||
continue
|
||||
node['uri'] = candidate
|
||||
else:
|
||||
|
@@ -40,7 +40,7 @@ with "\\?": b?'here: >>>(\\\\|/)xbb<<<((\\\\|/)r)?'
|
||||
HTML_WARNINGS = ENV_WARNINGS + """\
|
||||
%(root)s/index.rst:\\d+: WARNING: unknown option: &option
|
||||
%(root)s/index.rst:\\d+: WARNING: citation not found: missing
|
||||
%(root)s/index.rst:\\d+: WARNING: no matching candidate for image URI u'foo.\\*'
|
||||
%(root)s/index.rst:\\d+: WARNING: a suitable image for html builder not found: foo.\\*
|
||||
%(root)s/index.rst:\\d+: WARNING: Could not lex literal_block as "c". Highlighting skipped.
|
||||
"""
|
||||
|
||||
|
@@ -36,7 +36,7 @@ STYLEFILES = ['article.cls', 'fancyhdr.sty', 'titlesec.sty', 'amsmath.sty',
|
||||
LATEX_WARNINGS = ENV_WARNINGS + """\
|
||||
%(root)s/index.rst:\\d+: WARNING: unknown option: &option
|
||||
%(root)s/index.rst:\\d+: WARNING: citation not found: missing
|
||||
%(root)s/index.rst:\\d+: WARNING: no matching candidate for image URI u'foo.\\*'
|
||||
%(root)s/index.rst:\\d+: WARNING: a suitable image for latex builder not found: foo.\\*
|
||||
%(root)s/index.rst:\\d+: WARNING: Could not lex literal_block as "c". Highlighting skipped.
|
||||
"""
|
||||
|
||||
|
@@ -25,8 +25,9 @@ from sphinx.writers.texinfo import TexinfoTranslator
|
||||
TEXINFO_WARNINGS = ENV_WARNINGS + """\
|
||||
%(root)s/index.rst:\\d+: WARNING: unknown option: &option
|
||||
%(root)s/index.rst:\\d+: WARNING: citation not found: missing
|
||||
%(root)s/index.rst:\\d+: WARNING: no matching candidate for image URI u'foo.\\*'
|
||||
%(root)s/index.rst:\\d+: WARNING: no matching candidate for image URI u'svgimg.\\*'
|
||||
%(root)s/index.rst:\\d+: WARNING: a suitable image for texinfo builder not found: foo.\\*
|
||||
%(root)s/index.rst:\\d+: WARNING: a suitable image for texinfo builder not found: \
|
||||
\\['application/pdf', 'image/svg\\+xml'\\] \\(svgimg.\\*\\)
|
||||
"""
|
||||
|
||||
if PY3:
|
||||
|
Reference in New Issue
Block a user