@@ -34,10 +34,16 @@ def _apply_transforms(self):
3434
3535 result = sphinx_doctree (file_params .content , "index.md" )
3636 pformat = result .pformat ("index" )
37- # changed in docutils 0.20.1
38- pformat = pformat .replace (
39- '<literal classes="code" language="">' , '<literal classes="code">'
40- )
37+ replacements = {
38+ # changed in docutils 0.20.1
39+ '<literal classes="code" language="">' : '<literal classes="code">' ,
40+ # changed in sphinx 9
41+ '<image alt="" uri="">' : "<image alt=\" \" candidates=\" {'*': '.'}\" original_uri=\" \" uri=\" .\" >" ,
42+ '<image alt="alt" title="title" uri="src">' : "<image alt=\" alt\" candidates=\" {'*': 'src'}\" title=\" title\" uri=\" src\" >" ,
43+ '<image alt="alt" uri=\" http://www.google%3C%3E.com\" >' : "<image alt=\" alt\" candidates=\" {'?': 'http://www.google%3C%3E.com'}\" uri=\" http://www.google%3C%3E.com\" >" ,
44+ }
45+ for old , new in replacements .items ():
46+ pformat = pformat .replace (old , new )
4147 file_params .assert_expected (pformat , rstrip_lines = True )
4248
4349
@@ -89,9 +95,7 @@ def test_sphinx_directives(
8995):
9096 # TODO fix skipped directives
9197 # TODO test domain directives
92- if file_params .title .startswith ("SKIP" ) or file_params .title .startswith (
93- "SPHINX4-SKIP"
94- ):
98+ if file_params .title .startswith ("SKIP" ):
9599 pytest .skip (file_params .title )
96100
97101 sphinx_doctree_no_tr .set_conf ({"extensions" : ["myst_parser" ]})
0 commit comments