mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge branch '1.7' into 4688_remote_image_having_long_URL
This commit is contained in:
commit
d7ebcf6f45
3
CHANGES
3
CHANGES
@ -27,6 +27,9 @@ 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
|
||||
* #4655, #4684: Incomplete localization strings in Polish and Chinese
|
||||
* #2286: Sphinx crashes when error is happens in rendering HTML pages
|
||||
* #4688: Error to download remote images having long URL
|
||||
|
||||
Testing
|
||||
|
@ -96,7 +96,7 @@ switch on line numbers for the individual block::
|
||||
Some more Ruby code.
|
||||
|
||||
The first line number can be selected with the ``lineno-start`` option. If
|
||||
present, ``linenos`` is automatically activated as well::
|
||||
present, ``linenos`` flag is automatically activated::
|
||||
|
||||
.. code-block:: ruby
|
||||
:lineno-start: 10
|
||||
|
@ -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:
|
||||
|
@ -35,8 +35,9 @@ from sphinx.deprecation import RemovedInSphinx20Warning
|
||||
from sphinx.environment.adapters.asset import ImageAdapter
|
||||
from sphinx.environment.adapters.indexentries import IndexEntries
|
||||
from sphinx.environment.adapters.toctree import TocTree
|
||||
from sphinx.errors import ThemeError
|
||||
from sphinx.highlighting import PygmentsBridge
|
||||
from sphinx.locale import _, l_
|
||||
from sphinx.locale import _, __, l_
|
||||
from sphinx.search import js_index
|
||||
from sphinx.theming import HTMLThemeFactory
|
||||
from sphinx.util import jsonimpl, logging, status_iterator
|
||||
@ -1016,6 +1017,9 @@ class StandaloneHTMLBuilder(Builder):
|
||||
"Please make sure all config values that contain "
|
||||
"non-ASCII content are Unicode strings.", pagename)
|
||||
return
|
||||
except Exception as exc:
|
||||
raise ThemeError(__("An error happened in rendering the page %s.\nReason: %r") %
|
||||
(pagename, exc))
|
||||
|
||||
if not outfilename:
|
||||
outfilename = self.get_outfilename(pagename)
|
||||
|
@ -104,7 +104,7 @@ def jobs_argument(value):
|
||||
def get_parser():
|
||||
# type: () -> argparse.ArgumentParser
|
||||
parser = argparse.ArgumentParser(
|
||||
usage='usage: %(prog)s [OPTIONS] SOURCEDIR OUTPUTDIR [FILENAMES...]',
|
||||
usage='%(prog)s [OPTIONS] SOURCEDIR OUTPUTDIR [FILENAMES...]',
|
||||
epilog='For more information, visit <http://sphinx-doc.org/>.',
|
||||
description="""
|
||||
Generate documentation from source files.
|
||||
|
@ -295,7 +295,7 @@ def is_excluded(root, excludes):
|
||||
def get_parser():
|
||||
# type: () -> argparse.ArgumentParser
|
||||
parser = argparse.ArgumentParser(
|
||||
usage='usage: %(prog)s [OPTIONS] -o <OUTPUT_PATH> <MODULE_PATH> '
|
||||
usage='%(prog)s [OPTIONS] -o <OUTPUT_PATH> <MODULE_PATH> '
|
||||
'[EXCLUDE_PATTERN, ...]',
|
||||
epilog='For more information, visit <http://sphinx-doc.org/>.',
|
||||
description="""
|
||||
|
Binary file not shown.
@ -265,7 +265,7 @@ msgstr ""
|
||||
msgid ""
|
||||
"the extension %r was already merged with Sphinx since version %s; this "
|
||||
"extension is ignored."
|
||||
msgstr "自版本 %s 开始,扩展 %r 已合并至 Sphinx;该扩展被忽略。"
|
||||
msgstr ""
|
||||
|
||||
#: sphinx/registry.py:315
|
||||
msgid "Original exception:\n"
|
||||
@ -1295,7 +1295,7 @@ msgstr "目录"
|
||||
#: sphinx/transforms/post_transforms/__init__.py:139
|
||||
#, python-format
|
||||
msgid "more than one target found for 'any' cross-reference %r: could be %s"
|
||||
msgstr "'any' 交叉引用的目标不唯一:可能是 %s"
|
||||
msgstr ""
|
||||
|
||||
#: sphinx/transforms/post_transforms/__init__.py:169
|
||||
#, python-format
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user