mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #2407: building docs crash if document includes large data image URIs
This commit is contained in:
1
CHANGES
1
CHANGES
@@ -11,6 +11,7 @@ Bugs fixed
|
||||
|
||||
* #2370: the equations are slightly misaligned in LaTeX writer
|
||||
* #1817, #2077: suppress pep8 warnings on conf.py generated by sphinx-quickstart
|
||||
* #2407: building docs crash if document includes large data image URIs
|
||||
|
||||
|
||||
Release 1.4.1 (released Apr 12, 2016)
|
||||
|
||||
@@ -907,7 +907,11 @@ class BuildEnvironment:
|
||||
# The special key ? is set for nonlocal URIs.
|
||||
node['candidates'] = candidates = {}
|
||||
imguri = node['uri']
|
||||
if imguri.find('://') != -1:
|
||||
if imguri.startswith('data:'):
|
||||
self.warn_node('image data URI found. some builders might not support', node)
|
||||
candidates['?'] = imguri
|
||||
continue
|
||||
elif imguri.find('://') != -1:
|
||||
self.warn_node('nonlocal image URI found: %s' % imguri, node)
|
||||
candidates['?'] = imguri
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user