Fix #4913: i18n: literal blocks in bullet list are not translated

This commit is contained in:
Takeshi KOMIYA
2018-05-04 02:30:16 +09:00
parent 2d42753acd
commit 5c56c99dfd
5 changed files with 31 additions and 0 deletions

View File

@@ -1000,6 +1000,14 @@ def test_additional_targets_should_not_be_translated(app):
"""<span class="cpf">&lt;stdio.h&gt;</span>""")
assert_count(expected_expr, result, 1)
# literal block in list item should not be translated
expected_expr = ("""<span class="n">literal</span>"""
"""<span class="o">-</span>"""
"""<span class="n">block</span>\n"""
"""<span class="k">in</span> """
"""<span class="n">list</span>""")
assert_count(expected_expr, result, 1)
# doctest block should not be translated but be highlighted
expected_expr = (
"""<span class="gp">&gt;&gt;&gt; </span>"""
@@ -1066,6 +1074,14 @@ def test_additional_targets_should_be_translated(app):
"""<span class="cpf">&lt;STDIO.H&gt;</span>""")
assert_count(expected_expr, result, 1)
# literal block in list item should be translated
expected_expr = ("""<span class="no">LITERAL</span>"""
"""<span class="o">-</span>"""
"""<span class="no">BLOCK</span>\n"""
"""<span class="no">IN</span> """
"""<span class="no">LIST</span>""")
assert_count(expected_expr, result, 1)
# doctest block should not be translated but be highlighted
expected_expr = (
"""<span class="gp">&gt;&gt;&gt; </span>"""