95 chars in line. It was warned by make check.

This commit is contained in:
shimizukawa 2016-01-12 23:53:45 +09:00
parent 8bd5b22561
commit d33b32323f
3 changed files with 12 additions and 6 deletions

View File

@ -43,9 +43,11 @@ class NestedInlineTransform(object):
Flatten nested inline nodes: Flatten nested inline nodes:
Before: Before:
<strong>foo=<emphasis>1</emphasis>&bar=<emphasis>2</emphasis></strong> <strong>foo=<emphasis>1</emphasis>
&bar=<emphasis>2</emphasis></strong>
After: After:
<strong>foo=</strong><emphasis>var</emphasis><strong>&bar=</strong><emphasis>2</emphasis> <strong>foo=</strong><emphasis>var</emphasis>
<strong>&bar=</strong><emphasis>2</emphasis>
""" """
def __init__(self, document): def __init__(self, document):
self.document = document self.document = document

View File

@ -391,7 +391,8 @@ def test_latex_show_urls_is_footnote(app, status, warning):
'\\leavevmode\\footnotetext[7]{\nhttp://sphinx-doc.org/\n}\nDescription' in result) '\\leavevmode\\footnotetext[7]{\nhttp://sphinx-doc.org/\n}\nDescription' in result)
assert ('\\item[{Footnote in term \\protect\\footnotemark[9]}] ' assert ('\\item[{Footnote in term \\protect\\footnotemark[9]}] '
'\\leavevmode\\footnotetext[9]{\nFootnote in term\n}\nDescription' in result) '\\leavevmode\\footnotetext[9]{\nFootnote in term\n}\nDescription' in result)
assert ('\\item[{\\href{http://sphinx-doc.org/}{Term in deflist}\\protect\\footnotemark[8]}] ' assert ('\\item[{\\href{http://sphinx-doc.org/}{Term in deflist}\\protect'
'\\footnotemark[8]}] '
'\\leavevmode\\footnotetext[8]{\nhttp://sphinx-doc.org/\n}\nDescription' in result) '\\leavevmode\\footnotetext[8]{\nhttp://sphinx-doc.org/\n}\nDescription' in result)
assert ('\\href{https://github.com/sphinx-doc/sphinx}' assert ('\\href{https://github.com/sphinx-doc/sphinx}'
'{https://github.com/sphinx-doc/sphinx}\n' in result) '{https://github.com/sphinx-doc/sphinx}\n' in result)
@ -431,9 +432,11 @@ def test_image_in_section(app, status, warning):
print(result) print(result)
print(status.getvalue()) print(status.getvalue())
print(warning.getvalue()) print(warning.getvalue())
assert ('\chapter[Test section]{\includegraphics[width=15pt,height=15pt]{{pic}.png} Test section}' assert ('\chapter[Test section]'
'{\includegraphics[width=15pt,height=15pt]{{pic}.png} Test section}'
in result) in result)
assert ('\chapter[Other {[}blah{]} section]{Other {[}blah{]} \includegraphics[width=15pt,height=15pt]{{pic}.png} section}' in result) assert ('\chapter[Other {[}blah{]} section]{Other {[}blah{]} '
'\includegraphics[width=15pt,height=15pt]{{pic}.png} section}' in result)
assert ('\chapter{Another section}' in result) assert ('\chapter{Another section}' in result)

View File

@ -15,7 +15,8 @@ def test_encode_uri():
expected = (u'https://ru.wikipedia.org/wiki/%D0%A1%D0%B8%D1%81%D1%82%D0%B5%D0%BC%D0%B0_' expected = (u'https://ru.wikipedia.org/wiki/%D0%A1%D0%B8%D1%81%D1%82%D0%B5%D0%BC%D0%B0_'
u'%D1%83%D0%BF%D1%80%D0%B0%D0%B2%D0%BB%D0%B5%D0%BD%D0%B8%D1%8F_' u'%D1%83%D0%BF%D1%80%D0%B0%D0%B2%D0%BB%D0%B5%D0%BD%D0%B8%D1%8F_'
u'%D0%B1%D0%B0%D0%B7%D0%B0%D0%BC%D0%B8_%D0%B4%D0%B0%D0%BD%D0%BD%D1%8B%D1%85') u'%D0%B1%D0%B0%D0%B7%D0%B0%D0%BC%D0%B8_%D0%B4%D0%B0%D0%BD%D0%BD%D1%8B%D1%85')
uri = u'https://ru.wikipedia.org/wiki/Система_управления_базами_данных' uri = (u'https://ru.wikipedia.org/wiki'
u'/Система_управления_базами_данных')
assert expected, encode_uri(uri) assert expected, encode_uri(uri)
expected = (u'https://github.com/search?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+is%3A' expected = (u'https://github.com/search?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+is%3A'