mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #4913: i18n: literal blocks in bullet list are not translated
This commit is contained in:
@@ -1000,6 +1000,14 @@ def test_additional_targets_should_not_be_translated(app):
|
||||
"""<span class="cpf"><stdio.h></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">>>> </span>"""
|
||||
@@ -1066,6 +1074,14 @@ def test_additional_targets_should_be_translated(app):
|
||||
"""<span class="cpf"><STDIO.H></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">>>> </span>"""
|
||||
|
||||
Reference in New Issue
Block a user