Fix two test samples to avoid new Docutils warning. (#14540)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
This commit is contained in:
Günter MildeandBénédikt Tran authored and GitHub committed 2026-08-07 22:14:54 +02:00
1 parent b06d92e80e
commit e44a40eb2f
2 files changed
+8 -3

No files matched your search

+3
View File
@@ -34,6 +34,8 @@ image url and alt
.. figure:: img.png
:alt: img
..
image on substitution
---------------------
@@ -51,3 +53,4 @@ image under note
.. figure:: img.png
:alt: img under note
..
+5 -3
View File
@@ -3,6 +3,7 @@
from __future__ import annotations
import os
import re
import subprocess
import xml.etree.ElementTree as ET
from collections import Counter
@@ -418,9 +419,10 @@ def test_epub_anchor_id(app: SphinxTestApp) -> None:
html = (app.outdir / 'index.xhtml').read_text(encoding='utf8')
assert '<p id="std-setting-STATICFILES_FINDERS">blah blah blah</p>' in html
assert (
'<span id="std-setting-STATICFILES_SECTION"></span><h1>blah blah blah</h1>'
) in html
assert re.search(
r'<span id="std-setting-STATICFILES_SECTION"></span>\s*<h1>blah blah blah</h1>',
html,
)
assert (
'see <a class="reference internal" href="#std-setting-STATICFILES_FINDERS">'
) in html