Fix #2667: latex crashes if resized images appeared in section title

This commit is contained in:
Takeshi KOMIYA
2016-07-03 00:58:27 +09:00
parent 0ecfa8e8e9
commit 7eca745b5c
3 changed files with 13 additions and 4 deletions

View File

@@ -577,11 +577,12 @@ def test_image_in_section(app, status, warning):
print(result)
print(status.getvalue())
print(warning.getvalue())
assert ('\\chapter[Test section]'
'{\\sphinxincludegraphics[width=15pt,height=15pt]{{pic}.png} Test section}'
assert ('\\chapter[Test section]{\\lowercase{\\sphinxincludegraphics'
'[width=15pt,height=15pt]}{{pic}.png} Test section}'
in result)
assert ('\\chapter[Other {[}blah{]} section]{Other {[}blah{]} '
'\\sphinxincludegraphics[width=15pt,height=15pt]{{pic}.png} section}' in result)
'\\lowercase{\\sphinxincludegraphics[width=15pt,height=15pt]}'
'{{pic}.png} section}' in result)
assert ('\\chapter{Another section}' in result)