mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-11-02 20:30:30 -06:00
Tests: adapt HTML escaping to pygments v2.21.0 change-in-behaviour (#14611)
This commit is contained in:
1 parent
e44a40eb2f
commit
b04a210129
4 files changed
+35
-11
No files matched your search
@@ -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">"abc"</span>'
|
||||
f'<span class="s2">{abc}</span>'
|
||||
'<span class="p">):</span> '
|
||||
'<span class="k">pass</span>'
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user