Tests: adapt HTML escaping to pygments v2.21.0 change-in-behaviour (#14611)

This commit is contained in:
James Addison authored and GitHub committed 2026-09-18 11:38:07 +02:00
1 parent e44a40eb2f
commit b04a210129
4 files changed
+35 -11

No files matched your search

+6 -1
View File
@@ -45,6 +45,11 @@ def test_html_code_role(app: SphinxTestApp) -> None:
else:
sp = ' '
if tuple(map(int, pygments.__version__.split('.')[:2])) >= (2, 21):
abc = '"abc"'
else:
abc = '"abc"'
app.build()
content = (app.outdir / 'index.html').read_text(encoding='utf8')
@@ -57,7 +62,7 @@ def test_html_code_role(app: SphinxTestApp) -> None:
'<span class="o">+</span> '
'<span class="kc">None</span> '
'<span class="o">+</span> '
'<span class="s2">&quot;abc&quot;</span>'
f'<span class="s2">{abc}</span>'
'<span class="p">):</span> '
'<span class="k">pass</span>'
)