mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-10-25 22:50:22 -05:00
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:
1 parent
b06d92e80e
commit
e44a40eb2f
2 files changed
+8
-3
No files matched your search
@@ -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
|
||||
|
||||
..
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user