From 2e91dd85a4deaf997a79e07bc130d22271c0207f Mon Sep 17 00:00:00 2001 From: Chris Sewell Date: Tue, 7 Jun 2022 11:55:36 +0200 Subject: [PATCH] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20Drop=20Sphinx=203,=20add?= =?UTF-8?q?=20Sphinx=205=20(#579)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/tests.yml | 15 +- .pre-commit-config.yaml | 2 +- myst_parser/_compat.py | 11 + myst_parser/mdit_to_docutils/base.py | 9 +- myst_parser/sphinx_ext/myst_refs.py | 4 +- pyproject.toml | 5 +- .../fixtures/sphinx_directives.md | 16 +- tests/test_renderers/test_fixtures_sphinx.py | 11 +- tests/test_sphinx/conftest.py | 4 +- tests/test_sphinx/test_sphinx_builds.py | 47 ++-- .../test_basic.resolved.sphinx3.xml | 154 ------------- ...ed.sphinx4.xml => test_basic.resolved.xml} | 0 .../test_sphinx_builds/test_basic.sphinx3.xml | 155 ------------- ...c.sphinx3.html => test_basic.sphinx5.html} | 36 +-- ...{test_basic.sphinx4.xml => test_basic.xml} | 0 ...sphinx4.html => test_commonmark_only.html} | 2 +- .../test_commonmark_only.sphinx3.html | 28 --- ...hinx4.html => test_extended_syntaxes.html} | 2 +- .../test_extended_syntaxes.sphinx3.html | 173 -------------- .../test_extended_syntaxes.sphinx3.xml | 90 -------- ...sphinx4.xml => test_extended_syntaxes.xml} | 0 .../test_fieldlist_extension.sphinx3.xml | 82 ------- ... => test_fieldlist_extension.sphinx5.html} | 30 ++- ...hinx4.xml => test_fieldlist_extension.xml} | 0 .../test_footnotes.sphinx3.html | 147 ------------ .../test_footnotes.sphinx5.html | 211 ++++++++++++++++++ ...t_gettext.sphinx4.pot => test_gettext.pot} | 0 .../test_gettext.sphinx3.pot | 69 ------ ...ot => test_gettext_additional_targets.pot} | 0 ...est_gettext_additional_targets.sphinx3.pot | 126 ----------- .../test_gettext_html.resolved.sphinx3.xml | 93 -------- ...nx4.xml => test_gettext_html.resolved.xml} | 0 .../test_gettext_html.sphinx3.xml | 93 -------- ...x3.html => test_gettext_html.sphinx5.html} | 16 +- ...html.sphinx4.xml => test_gettext_html.xml} | 0 ...hinx4.html => test_heading_slug_func.html} | 4 +- .../test_heading_slug_func.sphinx3.html | 22 -- ...cludes.sphinx4.html => test_includes.html} | 8 +- .../test_includes.sphinx3.html | 131 ----------- .../test_includes.sphinx3.xml | 113 ---------- ...includes.sphinx4.xml => test_includes.xml} | 0 ...nces.sphinx4.html => test_references.html} | 4 +- .../test_references.sphinx3.html | 195 ---------------- ...4.html => test_references_singlehtml.html} | 8 +- .../test_references_singlehtml.sphinx3.html | 111 --------- tox.ini | 7 +- 46 files changed, 343 insertions(+), 1891 deletions(-) create mode 100644 myst_parser/_compat.py delete mode 100644 tests/test_sphinx/test_sphinx_builds/test_basic.resolved.sphinx3.xml rename tests/test_sphinx/test_sphinx_builds/{test_basic.resolved.sphinx4.xml => test_basic.resolved.xml} (100%) delete mode 100644 tests/test_sphinx/test_sphinx_builds/test_basic.sphinx3.xml rename tests/test_sphinx/test_sphinx_builds/{test_basic.sphinx3.html => test_basic.sphinx5.html} (89%) rename tests/test_sphinx/test_sphinx_builds/{test_basic.sphinx4.xml => test_basic.xml} (100%) rename tests/test_sphinx/test_sphinx_builds/{test_commonmark_only.sphinx4.html => test_commonmark_only.html} (97%) delete mode 100644 tests/test_sphinx/test_sphinx_builds/test_commonmark_only.sphinx3.html rename tests/test_sphinx/test_sphinx_builds/{test_extended_syntaxes.sphinx4.html => test_extended_syntaxes.html} (99%) delete mode 100644 tests/test_sphinx/test_sphinx_builds/test_extended_syntaxes.sphinx3.html delete mode 100644 tests/test_sphinx/test_sphinx_builds/test_extended_syntaxes.sphinx3.xml rename tests/test_sphinx/test_sphinx_builds/{test_extended_syntaxes.sphinx4.xml => test_extended_syntaxes.xml} (100%) delete mode 100644 tests/test_sphinx/test_sphinx_builds/test_fieldlist_extension.sphinx3.xml rename tests/test_sphinx/test_sphinx_builds/{test_fieldlist_extension.sphinx3.html => test_fieldlist_extension.sphinx5.html} (83%) rename tests/test_sphinx/test_sphinx_builds/{test_fieldlist_extension.sphinx4.xml => test_fieldlist_extension.xml} (100%) delete mode 100644 tests/test_sphinx/test_sphinx_builds/test_footnotes.sphinx3.html create mode 100644 tests/test_sphinx/test_sphinx_builds/test_footnotes.sphinx5.html rename tests/test_sphinx/test_sphinx_builds/{test_gettext.sphinx4.pot => test_gettext.pot} (100%) delete mode 100644 tests/test_sphinx/test_sphinx_builds/test_gettext.sphinx3.pot rename tests/test_sphinx/test_sphinx_builds/{test_gettext_additional_targets.sphinx4.pot => test_gettext_additional_targets.pot} (100%) delete mode 100644 tests/test_sphinx/test_sphinx_builds/test_gettext_additional_targets.sphinx3.pot delete mode 100644 tests/test_sphinx/test_sphinx_builds/test_gettext_html.resolved.sphinx3.xml rename tests/test_sphinx/test_sphinx_builds/{test_gettext_html.resolved.sphinx4.xml => test_gettext_html.resolved.xml} (100%) delete mode 100644 tests/test_sphinx/test_sphinx_builds/test_gettext_html.sphinx3.xml rename tests/test_sphinx/test_sphinx_builds/{test_gettext_html.sphinx3.html => test_gettext_html.sphinx5.html} (91%) rename tests/test_sphinx/test_sphinx_builds/{test_gettext_html.sphinx4.xml => test_gettext_html.xml} (100%) rename tests/test_sphinx/test_sphinx_builds/{test_heading_slug_func.sphinx4.html => test_heading_slug_func.html} (93%) delete mode 100644 tests/test_sphinx/test_sphinx_builds/test_heading_slug_func.sphinx3.html rename tests/test_sphinx/test_sphinx_builds/{test_includes.sphinx4.html => test_includes.html} (97%) delete mode 100644 tests/test_sphinx/test_sphinx_builds/test_includes.sphinx3.html delete mode 100644 tests/test_sphinx/test_sphinx_builds/test_includes.sphinx3.xml rename tests/test_sphinx/test_sphinx_builds/{test_includes.sphinx4.xml => test_includes.xml} (100%) rename tests/test_sphinx/test_sphinx_builds/{test_references.sphinx4.html => test_references.html} (98%) delete mode 100644 tests/test_sphinx/test_sphinx_builds/test_references.sphinx3.html rename tests/test_sphinx/test_sphinx_builds/{test_references_singlehtml.sphinx4.html => test_references_singlehtml.html} (96%) delete mode 100644 tests/test_sphinx/test_sphinx_builds/test_references_singlehtml.sphinx3.html diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4bbe10c5..4000d5da 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -26,16 +26,15 @@ jobs: fail-fast: false matrix: python-version: ["3.7", "3.8", "3.9", "3.10"] - sphinx: [">=4,<5"] + sphinx: [">=5,<6"] os: [ubuntu-latest] include: - # fails because of: https://github.com/sphinx-doc/sphinx/issues/10291 - # - os: ubuntu-latest - # python-version: "3.8" - # sphinx: ">=3,<4" - - os: windows-latest - python-version: "3.8" - sphinx: ">=4,<5" + - os: ubuntu-latest + python-version: "3.8" + sphinx: ">=4,<5" + - os: windows-latest + python-version: "3.8" + sphinx: ">=4,<5" runs-on: ${{ matrix.os }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a0ca0fc9..316a10dc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -50,7 +50,7 @@ repos: - id: mypy args: [--config-file=pyproject.toml] additional_dependencies: - - sphinx~=4.1 + - sphinx~=5.0 - markdown-it-py>=1.0.0,<3.0.0 - mdit-py-plugins~=0.3.0 files: > diff --git a/myst_parser/_compat.py b/myst_parser/_compat.py new file mode 100644 index 00000000..d29cf4d8 --- /dev/null +++ b/myst_parser/_compat.py @@ -0,0 +1,11 @@ +"""Helpers for cross compatibility across dependency versions.""" +from typing import Callable, Iterable + +from docutils.nodes import Element + + +def findall(node: Element) -> Callable[..., Iterable[Element]]: + """Iterate through""" + # findall replaces traverse in docutils v0.18 + # note a difference is that findall is an iterator + return getattr(node, "findall", node.traverse) diff --git a/myst_parser/mdit_to_docutils/base.py b/myst_parser/mdit_to_docutils/base.py index 252cc353..49c3fd22 100644 --- a/myst_parser/mdit_to_docutils/base.py +++ b/myst_parser/mdit_to_docutils/base.py @@ -32,6 +32,7 @@ from markdown_it.token import Token from markdown_it.tree import SyntaxTreeNode +from myst_parser._compat import findall from myst_parser.config.main import MdParserConfig from myst_parser.mocking import ( MockIncludeDirective, @@ -41,7 +42,7 @@ MockState, MockStateMachine, ) -from ..parsers.directives import DirectiveParsingError, parse_directive_text +from myst_parser.parsers.directives import DirectiveParsingError, parse_directive_text from .html_to_nodes import html_to_nodes from .utils import is_external_url @@ -260,7 +261,7 @@ def _render_finalise(self) -> None: # those from the initial markdown parse # instead we gather them from a walk of the created document foot_refs = OrderedDict() - for refnode in self.document.traverse(nodes.footnote_reference): + for refnode in findall(self.document)(nodes.footnote_reference): if refnode["refname"] not in foot_refs: foot_refs[refnode["refname"]] = True @@ -447,7 +448,7 @@ def render_inline(self, token: SyntaxTreeNode) -> None: self.render_children(token) def render_text(self, token: SyntaxTreeNode) -> None: - self.current_node.append(nodes.Text(token.content, token.content)) + self.current_node.append(nodes.Text(token.content)) def render_bullet_list(self, token: SyntaxTreeNode) -> None: list_node = nodes.bullet_list() @@ -888,7 +889,7 @@ def dict_to_fm_field_list( field_node = nodes.field() field_node.source = value - field_node += nodes.field_name(key, "", nodes.Text(key, key)) + field_node += nodes.field_name(key, "", nodes.Text(key)) field_node += nodes.field_body(value, *[body]) field_list += field_node diff --git a/myst_parser/sphinx_ext/myst_refs.py b/myst_parser/sphinx_ext/myst_refs.py index 81675a1b..9ba223d6 100644 --- a/myst_parser/sphinx_ext/myst_refs.py +++ b/myst_parser/sphinx_ext/myst_refs.py @@ -16,6 +16,8 @@ from sphinx.util import docname_join, logging from sphinx.util.nodes import clean_astext, make_refnode +from myst_parser._compat import findall + try: from sphinx.errors import NoUri except ImportError: @@ -35,7 +37,7 @@ class MystReferenceResolver(ReferencesResolver): def run(self, **kwargs: Any) -> None: self.document: document - for node in self.document.traverse(addnodes.pending_xref): + for node in findall(self.document)(addnodes.pending_xref): if node["reftype"] != "myst": continue diff --git a/pyproject.toml b/pyproject.toml index 487d334e..a2e988ab 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,12 +34,12 @@ keywords = [ ] requires-python = ">=3.7" dependencies = [ - "docutils>=0.15,<0.18", + "docutils>=0.15,<0.19", "jinja2", # required for substitutions, but let sphinx choose version "markdown-it-py>=1.0.0,<3.0.0", "mdit-py-plugins~=0.3.0", "pyyaml", - "sphinx>=3.1,<5", + "sphinx>=4,<6", "typing-extensions", ] @@ -63,7 +63,6 @@ rtd = [ testing = [ "beautifulsoup4", "coverage[toml]", - "docutils~=0.17.0", # this version changes some HTML tags "pytest>=6,<7", "pytest-cov", "pytest-regressions", diff --git a/tests/test_renderers/fixtures/sphinx_directives.md b/tests/test_renderers/fixtures/sphinx_directives.md index 2084558e..2b924572 100644 --- a/tests/test_renderers/fixtures/sphinx_directives.md +++ b/tests/test_renderers/fixtures/sphinx_directives.md @@ -14,7 +14,7 @@ default-domain (`sphinx.directives.DefaultDomain`): . -SPHINX4 object (`sphinx.directives.ObjectDescription`): +object (`sphinx.directives.ObjectDescription`): . ```{object} something ``` @@ -161,7 +161,7 @@ acks (`sphinx.directives.other.Acks`): name . -SPHINX4 hlist (`sphinx.directives.other.HList`): +hlist (`sphinx.directives.other.HList`): . ```{hlist} @@ -386,18 +386,18 @@ term 2 : B Definition of both terms. . -SPHINX3 productionlist (`sphinx.domains.std.ProductionList`): +SPHINX4-SKIP productionlist (`sphinx.domains.std.ProductionList`): . ```{productionlist} try_stmt: try1_stmt | try2_stmt ``` . - + try1_stmt | try2_stmt . -SPHINX4 cmdoption (`sphinx.domains.std.Cmdoption`): +cmdoption (`sphinx.domains.std.Cmdoption`): . ```{cmdoption} a ``` @@ -412,7 +412,7 @@ SPHINX4 cmdoption (`sphinx.domains.std.Cmdoption`): . -SPHINX4 rst:directive (`sphinx.domains.rst.ReSTDirective`): +rst:directive (`sphinx.domains.rst.ReSTDirective`): . ```{rst:directive} a ``` @@ -426,7 +426,7 @@ SPHINX4 rst:directive (`sphinx.domains.rst.ReSTDirective`): . -SPHINX4 rst:directive:option (`sphinx.domains.rst.ReSTDirectiveOption`): +SPHINX4-SKIP rst:directive:option (`sphinx.domains.rst.ReSTDirectiveOption`): . ```{rst:directive:option} a ``` @@ -434,7 +434,7 @@ SPHINX4 rst:directive:option (`sphinx.domains.rst.ReSTDirectiveOption`): - + :a: diff --git a/tests/test_renderers/test_fixtures_sphinx.py b/tests/test_renderers/test_fixtures_sphinx.py index abb57aa1..b8cf5497 100644 --- a/tests/test_renderers/test_fixtures_sphinx.py +++ b/tests/test_renderers/test_fixtures_sphinx.py @@ -9,7 +9,6 @@ from pathlib import Path import pytest -import sphinx from sphinx_pytest.plugin import CreateDoctree from myst_parser.mdit_to_docutils.sphinx_ import SphinxRenderer @@ -42,11 +41,9 @@ def test_directive_options(file_params, sphinx_doctree_no_tr: CreateDoctree): def test_sphinx_directives(file_params, sphinx_doctree_no_tr: CreateDoctree): # TODO fix skipped directives # TODO test domain directives - if file_params.title.startswith("SKIP"): - pytest.skip(file_params.title) - elif file_params.title.startswith("SPHINX3") and sphinx.version_info[0] < 3: - pytest.skip(file_params.title) - elif file_params.title.startswith("SPHINX4") and sphinx.version_info[0] < 4: + if file_params.title.startswith("SKIP") or file_params.title.startswith( + "SPHINX4-SKIP" + ): pytest.skip(file_params.title) sphinx_doctree_no_tr.set_conf({"extensions": ["myst_parser"]}) @@ -63,8 +60,6 @@ def test_sphinx_directives(file_params, sphinx_doctree_no_tr: CreateDoctree): def test_sphinx_roles(file_params, sphinx_doctree_no_tr: CreateDoctree): if file_params.title.startswith("SKIP"): pytest.skip(file_params.title) - elif file_params.title.startswith("SPHINX4") and sphinx.version_info[0] < 4: - pytest.skip(file_params.title) sphinx_doctree_no_tr.set_conf({"extensions": ["myst_parser"]}) pformat = sphinx_doctree_no_tr(file_params.content, "index.md").pformat("index") diff --git a/tests/test_sphinx/conftest.py b/tests/test_sphinx/conftest.py index e7fb75a8..4165a318 100644 --- a/tests/test_sphinx/conftest.py +++ b/tests/test_sphinx/conftest.py @@ -39,6 +39,8 @@ def test_basic(app, status, warning, get_sphinx_app_output): from bs4 import BeautifulSoup from sphinx.testing.path import path +from myst_parser._compat import findall + SOURCE_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), "sourcedirs")) @@ -109,7 +111,7 @@ def read( extension = regress_ext # convert absolute filenames - for node in doctree.traverse( + for node in findall(doctree)( lambda n: "source" in n and not isinstance(n, str) ): node["source"] = pathlib.Path(node["source"]).name diff --git a/tests/test_sphinx/test_sphinx_builds.py b/tests/test_sphinx/test_sphinx_builds.py index ca34c733..c30850f8 100644 --- a/tests/test_sphinx/test_sphinx_builds.py +++ b/tests/test_sphinx/test_sphinx_builds.py @@ -37,19 +37,19 @@ def test_basic( warnings = warning.getvalue().strip() assert warnings == "" - get_sphinx_app_doctree( - app, - docname="content", - regress=True, - regress_ext=f".sphinx{sphinx.version_info[0]}.xml", - ) - get_sphinx_app_doctree( - app, - docname="content", - resolve=True, - regress=True, - regress_ext=f".sphinx{sphinx.version_info[0]}.xml", - ) + try: + get_sphinx_app_doctree( + app, + docname="content", + regress=True, + ) + finally: + get_sphinx_app_doctree( + app, + docname="content", + resolve=True, + regress=True, + ) get_sphinx_app_output( app, filename="content.html", @@ -104,7 +104,7 @@ def test_references( app, filename="index.html", regress_html=True, - regress_ext=f".sphinx{sphinx.version_info[0]}.html", + replace={"Permalink to this headline": "Permalink to this heading"}, ) @@ -154,7 +154,7 @@ def test_references_singlehtml( filename="index.html", buildername="singlehtml", regress_html=True, - regress_ext=f".sphinx{sphinx.version_info[0]}.html", + replace={"Permalink to this headline": "Permalink to this heading"}, ) @@ -185,7 +185,7 @@ def test_heading_slug_func( app, filename="index.html", regress_html=True, - regress_ext=f".sphinx{sphinx.version_info[0]}.html", + replace={"Permalink to this headline": "Permalink to this heading"}, ) @@ -216,14 +216,13 @@ def test_extended_syntaxes( app, docname="index", regress=True, - regress_ext=f".sphinx{sphinx.version_info[0]}.xml", ) finally: get_sphinx_app_output( app, filename="index.html", regress_html=True, - regress_ext=f".sphinx{sphinx.version_info[0]}.html", + replace={"Permalink to this headline": "Permalink to this heading"}, ) @@ -249,7 +248,6 @@ def test_includes( app, docname="index", regress=True, - regress_ext=f".sphinx{sphinx.version_info[0]}.xml", # fix for Windows CI replace={ r"subfolder\example2.jpg": "subfolder/example2.jpg", @@ -262,8 +260,8 @@ def test_includes( app, filename="index.html", regress_html=True, - regress_ext=f".sphinx{sphinx.version_info[0]}.html", replace={ + "Permalink to this headline": "Permalink to this heading", r"'subfolder\\example2'": "'subfolder/example2'", r'uri="subfolder\\example2"': 'uri="subfolder/example2"', "_images/example21.jpg": "_images/example2.jpg", @@ -354,7 +352,7 @@ def test_commonmark_only( app, filename="index.html", regress_html=True, - regress_ext=f".sphinx{sphinx.version_info[0]}.html", + replace={"Permalink to this headline": "Permalink to this heading"}, ) @@ -407,7 +405,7 @@ def test_gettext( output = re.sub(r"POT-Creation-Date: [0-9: +-]+", "POT-Creation-Date: ", output) output = re.sub(r"Copyright \(C\) [0-9]{4}", "Copyright (C) XXXX", output) - file_regression.check(output, extension=f".sphinx{sphinx.version_info[0]}.pot") + file_regression.check(output, extension=".pot") @pytest.mark.sphinx( @@ -434,7 +432,6 @@ def test_gettext_html( app, docname="index", regress=True, - regress_ext=f".sphinx{sphinx.version_info[0]}.xml", ) finally: get_sphinx_app_doctree( @@ -442,7 +439,6 @@ def test_gettext_html( docname="index", resolve=True, regress=True, - regress_ext=f".sphinx{sphinx.version_info[0]}.xml", ) get_sphinx_app_output( app, @@ -483,7 +479,7 @@ def test_gettext_additional_targets( output = re.sub(r"POT-Creation-Date: [0-9: +-]+", "POT-Creation-Date: ", output) output = re.sub(r"Copyright \(C\) [0-9]{4}", "Copyright (C) XXXX", output) - file_regression.check(output, extension=f".sphinx{sphinx.version_info[0]}.pot") + file_regression.check(output, extension=".pot") @pytest.mark.sphinx( @@ -530,7 +526,6 @@ def test_fieldlist_extension( app, docname="index", regress=True, - regress_ext=f".sphinx{sphinx.version_info[0]}.xml", # changed in: # https://www.sphinx-doc.org/en/master/changes.html#release-4-4-0-released-jan-17-2022 replace={ diff --git a/tests/test_sphinx/test_sphinx_builds/test_basic.resolved.sphinx3.xml b/tests/test_sphinx/test_sphinx_builds/test_basic.resolved.sphinx3.xml deleted file mode 100644 index 762dc6bd..00000000 --- a/tests/test_sphinx/test_sphinx_builds/test_basic.resolved.sphinx3.xml +++ /dev/null @@ -1,154 +0,0 @@ - - - - Dedication - <paragraph> - To my - <emphasis> - homies - - <topic classes="abstract"> - <title> - Abstract - <paragraph> - Something something - <strong> - dark - side - <target refid="target"> - <section classes="tex2jax_ignore mathjax_ignore" ids="header target" names="header target"> - <title> - Header - <comment xml:space="preserve"> - comment - <note> - <paragraph> - abcd - <emphasis> - abc - - <reference refuri="https://www.google.com"> - google - <warning> - <paragraph> - xyz - <admonition classes="admonition-title-with-link-target2"> - <title> - Title with - <reference internal="True" refid="target2"> - <inline classes="std std-ref"> - link - <paragraph> - Content - <target refid="target2"> - <figure align="default" ids="id1 target2" names="target2"> - <reference refuri="https://www.google.com"> - <image candidates="{'*': 'example.jpg'}" height="40px" uri="example.jpg"> - <caption> - Caption - <paragraph> - <image alt="alternative text" candidates="{'*': 'example.jpg'}" uri="example.jpg"> - <paragraph> - <reference refuri="https://www.google.com"> - https://www.google.com - <paragraph> - <strong> - <literal classes="code"> - a=1{`} - <paragraph> - <math> - sdfds - <paragraph> - <strong> - <math> - a=1 - <math_block nowrap="False" number="True" xml:space="preserve"> - b=2 - <target refid="equation-eq-label"> - <math_block docname="content" ids="equation-eq-label" label="eq:label" nowrap="False" number="1" xml:space="preserve"> - c=2 - <paragraph> - <reference internal="True" refid="equation-eq-label"> - (1) - <paragraph> - <literal> - a=1{`} - <table align="default" classes="colwidths-auto"> - <tgroup cols="2"> - <colspec colwidth="50.0"> - <colspec colwidth="50.0"> - <thead> - <row> - <entry> - <paragraph> - a - <entry classes="text-right"> - <paragraph> - b - <tbody> - <row> - <entry> - <paragraph> - <emphasis> - a - <entry classes="text-right"> - <paragraph> - 2 - <row> - <entry> - <paragraph> - <reference refuri="https://google.com"> - link-a - <entry classes="text-right"> - <paragraph> - <reference refuri="https://python.org"> - link-b - <paragraph> - this - - is - - a - - paragraph - <comment xml:space="preserve"> - a comment 2 - <paragraph> - this is a second paragraph - <bullet_list bullet="-"> - <list_item> - <paragraph> - a list - <bullet_list bullet="-"> - <list_item> - <paragraph> - a sub list - <comment xml:space="preserve"> - a comment 3 - <bullet_list bullet="-"> - <list_item> - <paragraph> - new list? - <paragraph> - <reference internal="True" refid="target"> - <inline classes="std std-ref"> - Header - - <reference internal="True" refid="target2"> - <inline classes="std std-ref"> - Caption - <comment classes="block_break" xml:space="preserve"> - a block break - <paragraph> - <reference refuri="https://www.google.com" title="a title"> - name - <literal_block language="default" linenos="False" xml:space="preserve"> - def func(a, b=1): - print(a) - <paragraph> - Special substitution references: - <paragraph> - 57 - words | - 0 - min read diff --git a/tests/test_sphinx/test_sphinx_builds/test_basic.resolved.sphinx4.xml b/tests/test_sphinx/test_sphinx_builds/test_basic.resolved.xml similarity index 100% rename from tests/test_sphinx/test_sphinx_builds/test_basic.resolved.sphinx4.xml rename to tests/test_sphinx/test_sphinx_builds/test_basic.resolved.xml diff --git a/tests/test_sphinx/test_sphinx_builds/test_basic.sphinx3.xml b/tests/test_sphinx/test_sphinx_builds/test_basic.sphinx3.xml deleted file mode 100644 index 775a420e..00000000 --- a/tests/test_sphinx/test_sphinx_builds/test_basic.sphinx3.xml +++ /dev/null @@ -1,155 +0,0 @@ -<document source="content.md"> - <topic classes="dedication"> - <title> - Dedication - <paragraph> - To my - <emphasis> - homies - - <topic classes="abstract"> - <title> - Abstract - <paragraph> - Something something - <strong> - dark - side - <target refid="target"> - <section classes="tex2jax_ignore mathjax_ignore" ids="header target" names="header target"> - <title> - Header - <comment xml:space="preserve"> - comment - <note> - <paragraph> - abcd - <emphasis> - abc - - <reference refuri="https://www.google.com"> - google - <warning> - <paragraph> - xyz - <admonition classes="admonition-title-with-link-target2"> - <title> - Title with - <pending_xref refdoc="content" refdomain="True" refexplicit="True" reftarget="target2" reftype="myst" refwarn="True"> - <inline classes="xref myst"> - link - <paragraph> - Content - <target refid="target2"> - <figure align="default" ids="id1 target2" names="target2"> - <reference refuri="https://www.google.com"> - <image candidates="{'*': 'example.jpg'}" height="40px" uri="example.jpg"> - <caption> - Caption - <paragraph> - <image alt="alternative text" candidates="{'*': 'example.jpg'}" uri="example.jpg"> - <paragraph> - <reference refuri="https://www.google.com"> - https://www.google.com - <paragraph> - <strong> - <literal classes="code"> - a=1{`} - <paragraph> - <math> - sdfds - <paragraph> - <strong> - <math> - a=1 - <math_block nowrap="False" number="True" xml:space="preserve"> - b=2 - <target refid="equation-eq-label"> - <math_block docname="content" ids="equation-eq-label" label="eq:label" nowrap="False" number="1" xml:space="preserve"> - c=2 - <paragraph> - <pending_xref refdoc="content" refdomain="math" refexplicit="False" reftarget="eq:label" reftype="eq" refwarn="True"> - <literal classes="xref eq"> - eq:label - <paragraph> - <literal> - a=1{`} - <table align="default" classes="colwidths-auto"> - <tgroup cols="2"> - <colspec colwidth="50.0"> - <colspec colwidth="50.0"> - <thead> - <row> - <entry> - <paragraph> - a - <entry classes="text-right"> - <paragraph> - b - <tbody> - <row> - <entry> - <paragraph> - <emphasis> - a - <entry classes="text-right"> - <paragraph> - 2 - <row> - <entry> - <paragraph> - <reference refuri="https://google.com"> - link-a - <entry classes="text-right"> - <paragraph> - <reference refuri="https://python.org"> - link-b - <paragraph> - this - - is - - a - - paragraph - <comment xml:space="preserve"> - a comment 2 - <paragraph> - this is a second paragraph - <bullet_list bullet="-"> - <list_item> - <paragraph> - a list - <bullet_list bullet="-"> - <list_item> - <paragraph> - a sub list - <comment xml:space="preserve"> - a comment 3 - <bullet_list bullet="-"> - <list_item> - <paragraph> - new list? - <paragraph> - <pending_xref refdoc="content" refdomain="std" refexplicit="False" reftarget="target" reftype="ref" refwarn="True"> - <inline classes="xref std std-ref"> - target - - <pending_xref refdoc="content" refdomain="std" refexplicit="False" reftarget="target2" reftype="ref" refwarn="True"> - <inline classes="xref std std-ref"> - target2 - <comment classes="block_break" xml:space="preserve"> - a block break - <paragraph> - <reference refuri="https://www.google.com" title="a title"> - name - <literal_block language="default" xml:space="preserve"> - def func(a, b=1): - print(a) - <paragraph> - Special substitution references: - <paragraph> - 57 - words | - 0 - min read diff --git a/tests/test_sphinx/test_sphinx_builds/test_basic.sphinx3.html b/tests/test_sphinx/test_sphinx_builds/test_basic.sphinx5.html similarity index 89% rename from tests/test_sphinx/test_sphinx_builds/test_basic.sphinx3.html rename to tests/test_sphinx/test_sphinx_builds/test_basic.sphinx5.html index 36dd8c84..9813b705 100644 --- a/tests/test_sphinx/test_sphinx_builds/test_basic.sphinx3.html +++ b/tests/test_sphinx/test_sphinx_builds/test_basic.sphinx5.html @@ -1,7 +1,7 @@ <div class="documentwrapper"> <div class="bodywrapper"> <div class="body" role="main"> - <div class="dedication topic"> + <div class="topic dedication" role="doc-dedication"> <p class="topic-title"> Dedication </p> @@ -12,7 +12,7 @@ </em> </p> </div> - <div class="abstract topic"> + <div class="topic abstract" role="doc-abstract"> <p class="topic-title"> Abstract </p> @@ -24,12 +24,12 @@ side </p> </div> - <div class="tex2jax_ignore mathjax_ignore section" id="header"> + <section class="tex2jax_ignore mathjax_ignore" id="header"> <span id="target"> </span> <h1> Header - <a class="headerlink" href="#header" title="Permalink to this headline"> + <a class="headerlink" href="#header" title="Permalink to this heading"> ¶ </a> </h1> @@ -68,21 +68,23 @@ <h1> Content </p> </div> - <div class="figure align-default" id="id1"> + <figure class="align-default" id="id1"> <span id="target2"> </span> <a class="reference external image-reference" href="https://www.google.com"> <img alt="_images/example.jpg" src="_images/example.jpg" style="height: 40px;"/> </a> - <p class="caption"> - <span class="caption-text"> - Caption - </span> - <a class="headerlink" href="#id1" title="Permalink to this image"> - ¶ - </a> - </p> - </div> + <figcaption> + <p> + <span class="caption-text"> + Caption + </span> + <a class="headerlink" href="#id1" title="Permalink to this image"> + ¶ + </a> + </p> + </figcaption> + </figure> <p> <img alt="alternative text" src="_images/example.jpg"/> </p> @@ -136,7 +138,7 @@ <h1> </span> </code> </p> - <table class="colwidths-auto docutils align-default"> + <table class="docutils align-default"> <thead> <tr class="row-odd"> <th class="head"> @@ -144,7 +146,7 @@ <h1> a </p> </th> - <th class="text-right head"> + <th class="head text-right"> <p> b </p> @@ -244,7 +246,7 @@ <h1> <p> 57 words | 0 min read </p> - </div> + </section> </div> </div> </div> diff --git a/tests/test_sphinx/test_sphinx_builds/test_basic.sphinx4.xml b/tests/test_sphinx/test_sphinx_builds/test_basic.xml similarity index 100% rename from tests/test_sphinx/test_sphinx_builds/test_basic.sphinx4.xml rename to tests/test_sphinx/test_sphinx_builds/test_basic.xml diff --git a/tests/test_sphinx/test_sphinx_builds/test_commonmark_only.sphinx4.html b/tests/test_sphinx/test_sphinx_builds/test_commonmark_only.html similarity index 97% rename from tests/test_sphinx/test_sphinx_builds/test_commonmark_only.sphinx4.html rename to tests/test_sphinx/test_sphinx_builds/test_commonmark_only.html index 294bc663..381996f7 100644 --- a/tests/test_sphinx/test_sphinx_builds/test_commonmark_only.sphinx4.html +++ b/tests/test_sphinx/test_sphinx_builds/test_commonmark_only.html @@ -4,7 +4,7 @@ <section id="test"> <h1> Test - <a class="headerlink" href="#test" title="Permalink to this headline"> + <a class="headerlink" href="#test" title="Permalink to this heading"> ¶ </a> </h1> diff --git a/tests/test_sphinx/test_sphinx_builds/test_commonmark_only.sphinx3.html b/tests/test_sphinx/test_sphinx_builds/test_commonmark_only.sphinx3.html deleted file mode 100644 index b6d79f68..00000000 --- a/tests/test_sphinx/test_sphinx_builds/test_commonmark_only.sphinx3.html +++ /dev/null @@ -1,28 +0,0 @@ -<div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body" role="main"> - <div class="section" id="test"> - <h1> - Test - <a class="headerlink" href="#test" title="Permalink to this headline"> - ¶ - </a> - </h1> - <div class="highlight-{note} notranslate"> - <div class="highlight"> - <pre><span></span>hallo -</pre> - </div> - </div> - <p> - {a} - <code class="docutils literal notranslate"> - <span class="pre"> - b - </span> - </code> - </p> - </div> - </div> - </div> -</div> diff --git a/tests/test_sphinx/test_sphinx_builds/test_extended_syntaxes.sphinx4.html b/tests/test_sphinx/test_sphinx_builds/test_extended_syntaxes.html similarity index 99% rename from tests/test_sphinx/test_sphinx_builds/test_extended_syntaxes.sphinx4.html rename to tests/test_sphinx/test_sphinx_builds/test_extended_syntaxes.html index 082eb20c..cc6e85b5 100644 --- a/tests/test_sphinx/test_sphinx_builds/test_extended_syntaxes.sphinx4.html +++ b/tests/test_sphinx/test_sphinx_builds/test_extended_syntaxes.html @@ -4,7 +4,7 @@ <section class="tex2jax_ignore mathjax_ignore" id="test"> <h1> Test - <a class="headerlink" href="#test" title="Permalink to this headline"> + <a class="headerlink" href="#test" title="Permalink to this heading"> ¶ </a> </h1> diff --git a/tests/test_sphinx/test_sphinx_builds/test_extended_syntaxes.sphinx3.html b/tests/test_sphinx/test_sphinx_builds/test_extended_syntaxes.sphinx3.html deleted file mode 100644 index b1ff5caa..00000000 --- a/tests/test_sphinx/test_sphinx_builds/test_extended_syntaxes.sphinx3.html +++ /dev/null @@ -1,173 +0,0 @@ -<div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body" role="main"> - <div class="tex2jax_ignore mathjax_ignore section" id="test"> - <h1> - Test - <a class="headerlink" href="#test" title="Permalink to this headline"> - ¶ - </a> - </h1> - <p> - *disabled* - </p> - <p> - <span class="math notranslate nohighlight"> - \(a=1\) - </span> - </p> - <div class="math notranslate nohighlight"> - \[x=5\] - </div> - <div class="math notranslate nohighlight" id="equation-2"> - <span class="eqno"> - (1) - <a class="headerlink" href="#equation-2" title="Permalink to this equation"> - ¶ - </a> - </span> - \[x=5\] - </div> - <p> - $ a=1 $ - </p> - <p> - a - <div class="math notranslate nohighlight"> - \[c=3\] - </div> - b - </p> - <div class="amsmath math notranslate nohighlight" id="equation-mock-uuid"> - <span class="eqno"> - (2) - <a class="headerlink" href="#equation-mock-uuid" title="Permalink to this equation"> - ¶ - </a> - </span> - \[\begin{equation} -b=2 -\end{equation}\] - </div> - <div class="math notranslate nohighlight"> - \[ \begin{align}\begin{aligned}c=3\\d=4\end{aligned}\end{align} \] - </div> - <dl class="simple myst"> - <dt> - Term **1** - </dt> - <dd> - <p> - Definition *1* - </p> - <p> - second paragraph - </p> - </dd> - <dt> - Term 2 - </dt> - <dd> - <p> - Definition 2a - </p> - </dd> - <dd> - <p> - Definition 2b - </p> - </dd> - <dt> - Term 3 - </dt> - <dd> - <div class="highlight-none notranslate"> - <div class="highlight"> - <pre><span></span>code block -</pre> - </div> - </div> - </dd> - <dd> - <blockquote> - <div> - <p> - quote - </p> - </div> - </blockquote> - </dd> - <dd> - <p> - other - </p> - </dd> - </dl> - <div class="other figure align-default" id="target"> - <img alt="fun-fish" src="_images/fun-fish.png"/> - <p class="caption"> - <span class="caption-text"> - This is a caption in **Markdown** - </span> - <a class="headerlink" href="#target" title="Permalink to this image"> - ¶ - </a> - </p> - </div> - <div class="other figure align-default" id="other-target"> - <a class="bg-primary mb-1 reference internal image-reference" href="_images/fun-fish.png"> - <img alt="fishy" class="bg-primary mb-1" src="_images/fun-fish.png" style="width: 200px;"/> - </a> - <p class="caption"> - <span class="caption-text"> - This is a caption in **Markdown** - </span> - <a class="headerlink" href="#other-target" title="Permalink to this image"> - ¶ - </a> - </p> - </div> - <p> - linkify URL: - <a class="reference external" href="http://www.example.com"> - www.example.com - </a> - </p> - <ul class="contains-task-list simple"> - <li class="task-list-item"> - <p> - <input class="task-list-item-checkbox" disabled="disabled" type="checkbox"/> - hallo - </p> - </li> - <li class="task-list-item"> - <p> - <input checked="checked" class="task-list-item-checkbox" disabled="disabled" type="checkbox"/> - there - </p> - </li> - </ul> - <p> - Numbered code block: - </p> - <div class="highlight-typescript notranslate"> - <table class="highlighttable"> - <tr> - <td class="linenos"> - <div class="linenodiv"> - <pre><span class="normal">1</span></pre> - </div> - </td> - <td class="code"> - <div class="highlight"> - <pre><span></span><span class="kr">type</span> <span class="nx">Result</span> <span class="o">=</span> <span class="s2">"pass"</span> <span class="o">|</span> <span class="s2">"fail"</span> -</pre> - </div> - </td> - </tr> - </table> - </div> - </div> - </div> - </div> -</div> diff --git a/tests/test_sphinx/test_sphinx_builds/test_extended_syntaxes.sphinx3.xml b/tests/test_sphinx/test_sphinx_builds/test_extended_syntaxes.sphinx3.xml deleted file mode 100644 index 18802ecc..00000000 --- a/tests/test_sphinx/test_sphinx_builds/test_extended_syntaxes.sphinx3.xml +++ /dev/null @@ -1,90 +0,0 @@ -<document source="index.md"> - <meta content="meta description" lang="en" name="description"> - <meta content="en_US" property="og:locale"> - <section classes="tex2jax_ignore mathjax_ignore" ids="test" names="test"> - <title> - Test - <paragraph> - *disabled* - <paragraph> - <math> - a=1 - <math_block nowrap="False" number="True" xml:space="preserve"> - x=5 - <target refid="equation-2"> - <math_block docname="index" ids="equation-2" label="2" nowrap="False" number="1" xml:space="preserve"> - x=5 - <paragraph> - $ a=1 $ - <paragraph> - a - <math_block nowrap="False" number="True" xml:space="preserve"> - c=3 - b - <target refid="equation-mock-uuid"> - <math_block classes="amsmath" docname="index" ids="equation-mock-uuid" label="mock-uuid" nowrap="True" number="2" xml:space="preserve"> - \begin{equation} - b=2 - \end{equation} - <math_block docname="index" label="True" nowrap="False" number="True" xml:space="preserve"> - c=3 - - d=4 - <definition_list classes="simple myst"> - <definition_list_item> - <term> - Term **1** - <definition> - <paragraph> - Definition *1* - <paragraph> - second paragraph - <definition_list_item> - <term> - Term 2 - <definition> - <paragraph> - Definition 2a - <definition> - <paragraph> - Definition 2b - <definition_list_item> - <term> - Term 3 - <definition> - <literal_block language="none" xml:space="preserve"> - code block - <definition> - <block_quote> - <paragraph> - quote - <definition> - <paragraph> - other - <figure align="default" classes="other" ids="target" names="target"> - <image alt="fun-fish" candidates="{'*': 'fun-fish.png'}" uri="fun-fish.png"> - <caption> - This is a caption in **Markdown** - <figure align="default" classes="other" ids="other-target" names="other-target"> - <image alt="fishy" candidates="{'*': 'fun-fish.png'}" classes="bg-primary mb-1" uri="fun-fish.png" width="200px"> - <caption> - This is a caption in **Markdown** - <paragraph> - linkify URL: - <reference refuri="http://www.example.com"> - www.example.com - <bullet_list bullet="-" classes="contains-task-list"> - <list_item classes="task-list-item"> - <paragraph> - <raw format="html" xml:space="preserve"> - <input class="task-list-item-checkbox" disabled="disabled" type="checkbox"> - hallo - <list_item classes="task-list-item"> - <paragraph> - <raw format="html" xml:space="preserve"> - <input class="task-list-item-checkbox" checked="checked" disabled="disabled" type="checkbox"> - there - <paragraph> - Numbered code block: - <literal_block language="typescript" linenos="True" xml:space="preserve"> - type Result = "pass" | "fail" diff --git a/tests/test_sphinx/test_sphinx_builds/test_extended_syntaxes.sphinx4.xml b/tests/test_sphinx/test_sphinx_builds/test_extended_syntaxes.xml similarity index 100% rename from tests/test_sphinx/test_sphinx_builds/test_extended_syntaxes.sphinx4.xml rename to tests/test_sphinx/test_sphinx_builds/test_extended_syntaxes.xml diff --git a/tests/test_sphinx/test_sphinx_builds/test_fieldlist_extension.sphinx3.xml b/tests/test_sphinx/test_sphinx_builds/test_fieldlist_extension.sphinx3.xml deleted file mode 100644 index 9ce67bb3..00000000 --- a/tests/test_sphinx/test_sphinx_builds/test_fieldlist_extension.sphinx3.xml +++ /dev/null @@ -1,82 +0,0 @@ -<document source="index.md"> - <section ids="test" names="test"> - <title> - Test - <field_list classes="myst"> - <field> - <field_name> - field - <field_body> - <field> - <field_name> - <emphasis> - field - <field_body> - <paragraph> - content - <index entries="('pair',\ 'built-in\ function;\ send_message()',\ 'send_message',\ '',\ None)"> - <desc classes="py" desctype="function" domain="py" noindex="False" objtype="function"> - <desc_signature class="" fullname="send_message" ids="send_message" module="True"> - <desc_name xml:space="preserve"> - send_message - <desc_parameterlist xml:space="preserve"> - <desc_parameter xml:space="preserve"> - <desc_sig_name classes="n"> - sender - <desc_parameter xml:space="preserve"> - <desc_sig_name classes="n"> - priority - <desc_content> - <paragraph> - Send a message to a recipient - <field_list classes="myst"> - <field> - <field_name> - Parameters - <field_body> - <bullet_list> - <list_item> - <paragraph> - <literal_strong> - sender - ( - <pending_xref py:class="True" py:module="True" refdomain="py" refexplicit="False" refspecific="True" reftarget="str" reftype="class"> - <literal_emphasis> - str - ) - – - The person sending the message - <list_item> - <paragraph> - <literal_strong> - priority - ( - <pending_xref py:class="True" py:module="True" refdomain="py" refexplicit="False" refspecific="True" reftarget="int" reftype="class"> - <literal_emphasis> - int - ) - – - The priority of the message, can be a number 1-5 - <field> - <field_name> - Returns - <field_body> - <paragraph> - the message id - <field> - <field_name> - Return type - <field_body> - <paragraph> - <pending_xref py:class="True" py:module="True" refdomain="py" refexplicit="False" refspecific="True" reftarget="int" reftype="class"> - int - <field> - <field_name> - Raises - <field_body> - <paragraph> - <pending_xref py:class="True" py:module="True" refdomain="py" refexplicit="False" refspecific="True" reftarget="ValueError" reftype="exc"> - <literal_strong> - ValueError - – - if the message_body exceeds 160 characters diff --git a/tests/test_sphinx/test_sphinx_builds/test_fieldlist_extension.sphinx3.html b/tests/test_sphinx/test_sphinx_builds/test_fieldlist_extension.sphinx5.html similarity index 83% rename from tests/test_sphinx/test_sphinx_builds/test_fieldlist_extension.sphinx3.html rename to tests/test_sphinx/test_sphinx_builds/test_fieldlist_extension.sphinx5.html index 0d29ed85..8548f3d6 100644 --- a/tests/test_sphinx/test_sphinx_builds/test_fieldlist_extension.sphinx3.html +++ b/tests/test_sphinx/test_sphinx_builds/test_fieldlist_extension.sphinx5.html @@ -1,16 +1,19 @@ <div class="documentwrapper"> <div class="bodywrapper"> <div class="body" role="main"> - <div class="section" id="test"> + <section id="test"> <h1> Test - <a class="headerlink" href="#test" title="Permalink to this headline"> + <a class="headerlink" href="#test" title="Permalink to this heading"> ¶ </a> </h1> <dl class="myst field-list simple"> <dt class="field-odd"> field + <span class="colon"> + : + </span> </dt> <dd class="field-odd"> <p> @@ -20,6 +23,9 @@ <h1> <em> field </em> + <span class="colon"> + : + </span> </dt> <dd class="field-even"> <p> @@ -28,12 +34,12 @@ <h1> </dd> </dl> <dl class="py function"> - <dt id="send_message"> - <code class="sig-name descname"> + <dt class="sig sig-object py" id="send_message"> + <span class="sig-name descname"> <span class="pre"> send_message </span> - </code> + </span> <span class="sig-paren"> ( </span> @@ -66,6 +72,9 @@ <h1> <dl class="myst field-list simple"> <dt class="field-odd"> Parameters + <span class="colon"> + : + </span> </dt> <dd class="field-odd"> <ul class="simple"> @@ -97,6 +106,9 @@ <h1> </dd> <dt class="field-even"> Returns + <span class="colon"> + : + </span> </dt> <dd class="field-even"> <p> @@ -105,6 +117,9 @@ <h1> </dd> <dt class="field-odd"> Return type + <span class="colon"> + : + </span> </dt> <dd class="field-odd"> <p> @@ -113,6 +128,9 @@ <h1> </dd> <dt class="field-even"> Raises + <span class="colon"> + : + </span> </dt> <dd class="field-even"> <p> @@ -125,7 +143,7 @@ <h1> </dl> </dd> </dl> - </div> + </section> </div> </div> </div> diff --git a/tests/test_sphinx/test_sphinx_builds/test_fieldlist_extension.sphinx4.xml b/tests/test_sphinx/test_sphinx_builds/test_fieldlist_extension.xml similarity index 100% rename from tests/test_sphinx/test_sphinx_builds/test_fieldlist_extension.sphinx4.xml rename to tests/test_sphinx/test_sphinx_builds/test_fieldlist_extension.xml diff --git a/tests/test_sphinx/test_sphinx_builds/test_footnotes.sphinx3.html b/tests/test_sphinx/test_sphinx_builds/test_footnotes.sphinx3.html deleted file mode 100644 index fb0714c2..00000000 --- a/tests/test_sphinx/test_sphinx_builds/test_footnotes.sphinx3.html +++ /dev/null @@ -1,147 +0,0 @@ -<div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body" role="main"> - <div class="section" id="footnotes-with-markdown"> - <h1> - Footnotes with Markdown - <a class="headerlink" href="#footnotes-with-markdown" title="Permalink to this headline"> - ¶ - </a> - </h1> - <p> - <a class="footnote-reference brackets" href="#c" id="id1"> - 1 - </a> - </p> - <div class="admonition note"> - <p class="admonition-title"> - Note - </p> - <p> - <a class="footnote-reference brackets" href="#d" id="id2"> - 2 - </a> - </p> - </div> - <p> - <a class="footnote-reference brackets" href="#a" id="id3"> - 3 - </a> - </p> - <p> - <a class="footnote-reference brackets" href="#b" id="id4"> - 4 - </a> - </p> - <p> - <a class="footnote-reference brackets" href="#id8" id="id5"> - 123 - </a> - <a class="footnote-reference brackets" href="#id8" id="id6"> - 123 - </a> - </p> - <p> - <a class="footnote-reference brackets" href="#e" id="id7"> - 5 - </a> - </p> - <blockquote> - <div> - <ul class="simple"> - <li> - </li> - </ul> - </div> - </blockquote> - <hr class="footnotes docutils"/> - <dl class="footnote brackets"> - <dt class="label" id="c"> - <span class="brackets"> - <a class="fn-backref" href="#id1"> - 1 - </a> - </span> - </dt> - <dd> - <p> - a footnote referenced first - </p> - </dd> - <dt class="label" id="d"> - <span class="brackets"> - <a class="fn-backref" href="#id2"> - 2 - </a> - </span> - </dt> - <dd> - <p> - a footnote referenced in a directive - </p> - </dd> - <dt class="label" id="a"> - <span class="brackets"> - <a class="fn-backref" href="#id3"> - 3 - </a> - </span> - </dt> - <dd> - <p> - some footnote - <em> - text - </em> - </p> - </dd> - <dt class="label" id="b"> - <span class="brackets"> - <a class="fn-backref" href="#id4"> - 4 - </a> - </span> - </dt> - <dd> - <p> - a footnote before its reference - </p> - </dd> - <dt class="label" id="id8"> - <span class="brackets"> - 123 - </span> - <span class="fn-backref"> - ( - <a href="#id5"> - 1 - </a> - , - <a href="#id6"> - 2 - </a> - ) - </span> - </dt> - <dd> - <p> - multiple references footnote - </p> - </dd> - <dt class="label" id="e"> - <span class="brackets"> - <a class="fn-backref" href="#id7"> - 5 - </a> - </span> - </dt> - <dd> - <p> - footnote definition in a block element - </p> - </dd> - </dl> - </div> - </div> - </div> -</div> diff --git a/tests/test_sphinx/test_sphinx_builds/test_footnotes.sphinx5.html b/tests/test_sphinx/test_sphinx_builds/test_footnotes.sphinx5.html new file mode 100644 index 00000000..9129e236 --- /dev/null +++ b/tests/test_sphinx/test_sphinx_builds/test_footnotes.sphinx5.html @@ -0,0 +1,211 @@ +<div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + <section id="footnotes-with-markdown"> + <h1> + Footnotes with Markdown + <a class="headerlink" href="#footnotes-with-markdown" title="Permalink to this heading"> + ¶ + </a> + </h1> + <p> + <a class="footnote-reference brackets" href="#c" id="id1" role="doc-noteref"> + <span class="fn-bracket"> + [ + </span> + 1 + <span class="fn-bracket"> + ] + </span> + </a> + </p> + <div class="admonition note"> + <p class="admonition-title"> + Note + </p> + <p> + <a class="footnote-reference brackets" href="#d" id="id2" role="doc-noteref"> + <span class="fn-bracket"> + [ + </span> + 2 + <span class="fn-bracket"> + ] + </span> + </a> + </p> + </div> + <p> + <a class="footnote-reference brackets" href="#a" id="id3" role="doc-noteref"> + <span class="fn-bracket"> + [ + </span> + 3 + <span class="fn-bracket"> + ] + </span> + </a> + </p> + <p> + <a class="footnote-reference brackets" href="#b" id="id4" role="doc-noteref"> + <span class="fn-bracket"> + [ + </span> + 4 + <span class="fn-bracket"> + ] + </span> + </a> + </p> + <p> + <a class="footnote-reference brackets" href="#id8" id="id5" role="doc-noteref"> + <span class="fn-bracket"> + [ + </span> + 123 + <span class="fn-bracket"> + ] + </span> + </a> + <a class="footnote-reference brackets" href="#id8" id="id6" role="doc-noteref"> + <span class="fn-bracket"> + [ + </span> + 123 + <span class="fn-bracket"> + ] + </span> + </a> + </p> + <p> + <a class="footnote-reference brackets" href="#e" id="id7" role="doc-noteref"> + <span class="fn-bracket"> + [ + </span> + 5 + <span class="fn-bracket"> + ] + </span> + </a> + </p> + <blockquote> + <div> + <ul class="simple"> + <li> + </li> + </ul> + </div> + </blockquote> + <hr class="footnotes docutils"/> + <aside class="footnote brackets" id="c" role="note"> + <span class="label"> + <span class="fn-bracket"> + [ + </span> + <a href="#id1" role="doc-backlink"> + 1 + </a> + <span class="fn-bracket"> + ] + </span> + </span> + <p> + a footnote referenced first + </p> + </aside> + <aside class="footnote brackets" id="d" role="note"> + <span class="label"> + <span class="fn-bracket"> + [ + </span> + <a href="#id2" role="doc-backlink"> + 2 + </a> + <span class="fn-bracket"> + ] + </span> + </span> + <p> + a footnote referenced in a directive + </p> + </aside> + <aside class="footnote brackets" id="a" role="note"> + <span class="label"> + <span class="fn-bracket"> + [ + </span> + <a href="#id3" role="doc-backlink"> + 3 + </a> + <span class="fn-bracket"> + ] + </span> + </span> + <p> + some footnote + <em> + text + </em> + </p> + </aside> + <aside class="footnote brackets" id="b" role="note"> + <span class="label"> + <span class="fn-bracket"> + [ + </span> + <a href="#id4" role="doc-backlink"> + 4 + </a> + <span class="fn-bracket"> + ] + </span> + </span> + <p> + a footnote before its reference + </p> + </aside> + <aside class="footnote brackets" id="id8" role="note"> + <span class="label"> + <span class="fn-bracket"> + [ + </span> + 123 + <span class="fn-bracket"> + ] + </span> + </span> + <span class="backrefs"> + ( + <a href="#id5" role="doc-backlink"> + 1 + </a> + , + <a href="#id6" role="doc-backlink"> + 2 + </a> + ) + </span> + <p> + multiple references footnote + </p> + </aside> + <aside class="footnote brackets" id="e" role="note"> + <span class="label"> + <span class="fn-bracket"> + [ + </span> + <a href="#id7" role="doc-backlink"> + 5 + </a> + <span class="fn-bracket"> + ] + </span> + </span> + <p> + footnote definition in a block element + </p> + </aside> + </section> + </div> + </div> +</div> diff --git a/tests/test_sphinx/test_sphinx_builds/test_gettext.sphinx4.pot b/tests/test_sphinx/test_sphinx_builds/test_gettext.pot similarity index 100% rename from tests/test_sphinx/test_sphinx_builds/test_gettext.sphinx4.pot rename to tests/test_sphinx/test_sphinx_builds/test_gettext.pot diff --git a/tests/test_sphinx/test_sphinx_builds/test_gettext.sphinx3.pot b/tests/test_sphinx/test_sphinx_builds/test_gettext.sphinx3.pot deleted file mode 100644 index 5f767603..00000000 --- a/tests/test_sphinx/test_sphinx_builds/test_gettext.sphinx3.pot +++ /dev/null @@ -1,69 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) XXXX, Executable Book Project -# This file is distributed under the same license as the Python package. -# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: Python \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: \n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" -"Language-Team: LANGUAGE <LL@li.org>\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: ../../index.md:1 -msgid "**bold** text 1" -msgstr "" - -#: ../../index.md:3 -msgid "**bold** text 2" -msgstr "" - -#: ../../index.md:5 -msgid "**bold** text 3" -msgstr "" - -#: ../../index.md:10 -msgid "**bold** text 4" -msgstr "" - -#: ../../index.md:13 -msgid "**bold** text 5" -msgstr "" - -#: ../../index.md:15 -msgid "**bold** text 6" -msgstr "" - -#: ../../index.md:17 -msgid "**bold** text 7" -msgstr "" - -#: ../../index.md:18 -msgid "**bold** text 8" -msgstr "" - -#: ../../index.md:0 -msgid "**bold** text 9" -msgstr "" - -#: ../../index.md:0 -msgid "**bold** text 10" -msgstr "" - -#: ../../index.md:26 -msgid "**bold** text 11" -msgstr "" - -#: ../../index.md:28 -msgid "Extra ```backticks```" -msgstr "" - -#: ../../index.md:55 -msgid "![Fun Fish 1](fun-fish.png)" -msgstr "" diff --git a/tests/test_sphinx/test_sphinx_builds/test_gettext_additional_targets.sphinx4.pot b/tests/test_sphinx/test_sphinx_builds/test_gettext_additional_targets.pot similarity index 100% rename from tests/test_sphinx/test_sphinx_builds/test_gettext_additional_targets.sphinx4.pot rename to tests/test_sphinx/test_sphinx_builds/test_gettext_additional_targets.pot diff --git a/tests/test_sphinx/test_sphinx_builds/test_gettext_additional_targets.sphinx3.pot b/tests/test_sphinx/test_sphinx_builds/test_gettext_additional_targets.sphinx3.pot deleted file mode 100644 index 839d877b..00000000 --- a/tests/test_sphinx/test_sphinx_builds/test_gettext_additional_targets.sphinx3.pot +++ /dev/null @@ -1,126 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) XXXX, Executable Book Project -# This file is distributed under the same license as the Python package. -# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: Python \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: \n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" -"Language-Team: LANGUAGE <LL@li.org>\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: ../../index.md:1 -msgid "**bold** text 1" -msgstr "" - -#: ../../index.md:3 -msgid "**bold** text 2" -msgstr "" - -#: ../../index.md:5 -msgid "**bold** text 3" -msgstr "" - -#: ../../index.md:10 -msgid "**bold** text 4" -msgstr "" - -#: ../../index.md:13 -msgid "**bold** text 5" -msgstr "" - -#: ../../index.md:15 -msgid "**bold** text 6" -msgstr "" - -#: ../../index.md:17 -msgid "**bold** text 7" -msgstr "" - -#: ../../index.md:18 -msgid "**bold** text 8" -msgstr "" - -#: ../../index.md:0 -msgid "**bold** text 9" -msgstr "" - -#: ../../index.md:0 -msgid "**bold** text 10" -msgstr "" - -#: ../../index.md:24 -msgid "<div markdown=1>\n" -"" -msgstr "" - -#: ../../index.md:26 -msgid "**bold** text 11" -msgstr "" - -#: ../../index.md:28 -msgid "Extra ```backticks```" -msgstr "" - -#: ../../index.md:30 -msgid "</div>\n" -"" -msgstr "" - -#: ../../index.md:32 -msgid "**additional** text 12\n" -"" -msgstr "" - -#: ../../index.md:34 -msgid "**additional** text 13\n" -"" -msgstr "" - -#: ../../index.md:38 -msgid "{\n" -" \"additional\": \"text 14\"\n" -"}\n" -"" -msgstr "" - -#: ../../index.md:44 -msgid "<h3>**additional** text 15</h3>\n" -"" -msgstr "" - -#: ../../index.md:46 -msgid ">>> print('doctest block')\n" -"doctest block\n" -"" -msgstr "" - -#: ../../index.md:51 -msgid "<iframe src=\"http://sphinx-doc.org\"></iframe>" -msgstr "" - -#: ../../index.md:55 -msgid "![Fun Fish 1](fun-fish.png)" -msgstr "" - -#: ../../index.md:55 -msgid ".. image:: fun-fish.png\n" -" :alt: Fun Fish 1" -msgstr "" - -#: ../../index.md:57 -msgid ".. image:: fun-fish.png\n" -" :alt: Fun Fish 2" -msgstr "" - -#: ../../index.md:61 -msgid ".. image:: fun-fish.png\n" -" :alt: Fun Fish 3" -msgstr "" diff --git a/tests/test_sphinx/test_sphinx_builds/test_gettext_html.resolved.sphinx3.xml b/tests/test_sphinx/test_sphinx_builds/test_gettext_html.resolved.sphinx3.xml deleted file mode 100644 index 8d9866e6..00000000 --- a/tests/test_sphinx/test_sphinx_builds/test_gettext_html.resolved.sphinx3.xml +++ /dev/null @@ -1,93 +0,0 @@ -<document source="index.md"> - <section ids="bold-text-1" names="bold\ text\ 1 texte\ 1\ en\ gras"> - <title> - texte 1 en - <strong> - gras - <paragraph> - texte 2 en - <strong> - gras - <block_quote> - <paragraph> - texte 3 en - <strong> - gras - <note> - <paragraph> - texte 4 en - <strong> - gras - <bullet_list bullet="*"> - <list_item> - <paragraph> - texte 5 en - <strong> - gras - <enumerated_list enumtype="arabic" prefix="" suffix="."> - <list_item> - <paragraph> - texte 6 en - <strong> - gras - <definition_list classes="simple myst"> - <definition_list_item> - <term> - texte 7 en - <strong> - gras - <definition> - <paragraph> - texte 8 en - <strong> - gras - <table align="default" classes="colwidths-auto"> - <tgroup cols="1"> - <colspec colwidth="100.0"> - <thead> - <row> - <entry> - <paragraph> - texte 9 en - <strong> - gras - <tbody> - <row> - <entry> - <paragraph> - texte 10 en - <strong> - gras - <raw format="html" xml:space="preserve"> - <div markdown=1> - <paragraph> - texte 11 en - <strong> - gras - <paragraph> - «  - <literal> - Backtick -  » supplémentaire - <raw format="html" xml:space="preserve"> - </div> - <literal_block language="none" linenos="False" xml:space="preserve"> - **additional** text 12 - <literal_block language="default" linenos="False" xml:space="preserve"> - **additional** text 13 - <literal_block language="json" linenos="False" xml:space="preserve"> - { - "additional": "text 14" - } - <raw format="html" xml:space="preserve"> - <h3>**additional** text 15</h3> - <literal_block language="python" linenos="False" xml:space="preserve"> - >>> print('doctest block') - doctest block - <raw format="html" xml:space="preserve"> - <iframe src="http://sphinx-doc.org"></iframe> - <paragraph> - <image alt="Poisson amusant 1" candidates="{'*': 'poisson-amusant.png'}" uri="poisson-amusant.png"> - <image alt="Fun Fish 2" candidates="{'*': 'fun-fish.png'}" uri="fun-fish.png"> - <figure align="default"> - <image alt="Fun Fish 3" candidates="{'*': 'fun-fish.png'}" uri="fun-fish.png"> diff --git a/tests/test_sphinx/test_sphinx_builds/test_gettext_html.resolved.sphinx4.xml b/tests/test_sphinx/test_sphinx_builds/test_gettext_html.resolved.xml similarity index 100% rename from tests/test_sphinx/test_sphinx_builds/test_gettext_html.resolved.sphinx4.xml rename to tests/test_sphinx/test_sphinx_builds/test_gettext_html.resolved.xml diff --git a/tests/test_sphinx/test_sphinx_builds/test_gettext_html.sphinx3.xml b/tests/test_sphinx/test_sphinx_builds/test_gettext_html.sphinx3.xml deleted file mode 100644 index ef749eb6..00000000 --- a/tests/test_sphinx/test_sphinx_builds/test_gettext_html.sphinx3.xml +++ /dev/null @@ -1,93 +0,0 @@ -<document source="index.md"> - <section ids="bold-text-1" names="bold\ text\ 1 texte\ 1\ en\ gras"> - <title> - texte 1 en - <strong> - gras - <paragraph> - texte 2 en - <strong> - gras - <block_quote> - <paragraph> - texte 3 en - <strong> - gras - <note> - <paragraph> - texte 4 en - <strong> - gras - <bullet_list bullet="*"> - <list_item> - <paragraph> - texte 5 en - <strong> - gras - <enumerated_list enumtype="arabic" prefix="" suffix="."> - <list_item> - <paragraph> - texte 6 en - <strong> - gras - <definition_list classes="simple myst"> - <definition_list_item> - <term> - texte 7 en - <strong> - gras - <definition> - <paragraph> - texte 8 en - <strong> - gras - <table align="default" classes="colwidths-auto"> - <tgroup cols="1"> - <colspec colwidth="100.0"> - <thead> - <row> - <entry> - <paragraph> - texte 9 en - <strong> - gras - <tbody> - <row> - <entry> - <paragraph> - texte 10 en - <strong> - gras - <raw format="html" xml:space="preserve"> - <div markdown=1> - <paragraph> - texte 11 en - <strong> - gras - <paragraph> - «  - <literal> - Backtick -  » supplémentaire - <raw format="html" xml:space="preserve"> - </div> - <literal_block language="none" xml:space="preserve"> - **additional** text 12 - <literal_block language="default" xml:space="preserve"> - **additional** text 13 - <literal_block language="json" xml:space="preserve"> - { - "additional": "text 14" - } - <raw format="html" xml:space="preserve"> - <h3>**additional** text 15</h3> - <literal_block language="python" xml:space="preserve"> - >>> print('doctest block') - doctest block - <raw format="html" xml:space="preserve"> - <iframe src="http://sphinx-doc.org"></iframe> - <paragraph> - <image alt="Poisson amusant 1" candidates="{'*': 'poisson-amusant.png'}" uri="poisson-amusant.png"> - <image alt="Fun Fish 2" candidates="{'*': 'fun-fish.png'}" uri="fun-fish.png"> - <figure align="default"> - <image alt="Fun Fish 3" candidates="{'*': 'fun-fish.png'}" uri="fun-fish.png"> diff --git a/tests/test_sphinx/test_sphinx_builds/test_gettext_html.sphinx3.html b/tests/test_sphinx/test_sphinx_builds/test_gettext_html.sphinx5.html similarity index 91% rename from tests/test_sphinx/test_sphinx_builds/test_gettext_html.sphinx3.html rename to tests/test_sphinx/test_sphinx_builds/test_gettext_html.sphinx5.html index 1c1f8615..469e1882 100644 --- a/tests/test_sphinx/test_sphinx_builds/test_gettext_html.sphinx3.html +++ b/tests/test_sphinx/test_sphinx_builds/test_gettext_html.sphinx5.html @@ -1,13 +1,13 @@ <div class="documentwrapper"> <div class="bodywrapper"> <div class="body" role="main"> - <div class="section" id="bold-text-1"> + <section id="bold-text-1"> <h1> texte 1 en <strong> gras </strong> - <a class="headerlink" href="#bold-text-1" title="Lien permanent vers ce titre"> + <a class="headerlink" href="#bold-text-1" title="Lien permanent vers cette rubrique"> ¶ </a> </h1> @@ -74,7 +74,7 @@ <h1> </p> </dd> </dl> - <table class="colwidths-auto docutils align-default"> + <table class="docutils align-default"> <thead> <tr class="row-odd"> <th class="head"> @@ -152,11 +152,11 @@ <h3> <p> <img alt="Poisson amusant 1" src="_images/poisson-amusant.png"/> </p> - <img alt="Fun Fish 2" src="_images/fun-fish.png"/> - <div class="figure align-default"> - <img alt="Fun Fish 3" src="_images/fun-fish.png"/> - </div> - </div> + <img alt="Poisson amusant 2" src="_images/fun-fish.png"/> + <figure class="align-default"> + <img alt="Poisson amusant 3" src="_images/fun-fish.png"/> + </figure> + </section> </div> </div> </div> diff --git a/tests/test_sphinx/test_sphinx_builds/test_gettext_html.sphinx4.xml b/tests/test_sphinx/test_sphinx_builds/test_gettext_html.xml similarity index 100% rename from tests/test_sphinx/test_sphinx_builds/test_gettext_html.sphinx4.xml rename to tests/test_sphinx/test_sphinx_builds/test_gettext_html.xml diff --git a/tests/test_sphinx/test_sphinx_builds/test_heading_slug_func.sphinx4.html b/tests/test_sphinx/test_sphinx_builds/test_heading_slug_func.html similarity index 93% rename from tests/test_sphinx/test_sphinx_builds/test_heading_slug_func.sphinx4.html rename to tests/test_sphinx/test_sphinx_builds/test_heading_slug_func.html index b3631a0d..67c44157 100644 --- a/tests/test_sphinx/test_sphinx_builds/test_heading_slug_func.sphinx4.html +++ b/tests/test_sphinx/test_sphinx_builds/test_heading_slug_func.html @@ -4,14 +4,14 @@ <section id="hyphen-1"> <h1> Hyphen - 1 - <a class="headerlink" href="#hyphen-1" title="Permalink to this headline"> + <a class="headerlink" href="#hyphen-1" title="Permalink to this heading"> ¶ </a> </h1> <section id="dot-1-1"> <h2> Dot 1.1 - <a class="headerlink" href="#dot-1-1" title="Permalink to this headline"> + <a class="headerlink" href="#dot-1-1" title="Permalink to this heading"> ¶ </a> </h2> diff --git a/tests/test_sphinx/test_sphinx_builds/test_heading_slug_func.sphinx3.html b/tests/test_sphinx/test_sphinx_builds/test_heading_slug_func.sphinx3.html deleted file mode 100644 index cbf5e049..00000000 --- a/tests/test_sphinx/test_sphinx_builds/test_heading_slug_func.sphinx3.html +++ /dev/null @@ -1,22 +0,0 @@ -<div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body" role="main"> - <div class="section" id="hyphen-1"> - <h1> - Hyphen - 1 - <a class="headerlink" href="#hyphen-1" title="Permalink to this headline"> - ¶ - </a> - </h1> - <div class="section" id="dot-1-1"> - <h2> - Dot 1.1 - <a class="headerlink" href="#dot-1-1" title="Permalink to this headline"> - ¶ - </a> - </h2> - </div> - </div> - </div> - </div> -</div> diff --git a/tests/test_sphinx/test_sphinx_builds/test_includes.sphinx4.html b/tests/test_sphinx/test_sphinx_builds/test_includes.html similarity index 97% rename from tests/test_sphinx/test_sphinx_builds/test_includes.sphinx4.html rename to tests/test_sphinx/test_sphinx_builds/test_includes.html index 78662234..41eb1ee6 100644 --- a/tests/test_sphinx/test_sphinx_builds/test_includes.sphinx4.html +++ b/tests/test_sphinx/test_sphinx_builds/test_includes.html @@ -4,7 +4,7 @@ <section id="main-title"> <h1> Main Title - <a class="headerlink" href="#main-title" title="Permalink to this headline"> + <a class="headerlink" href="#main-title" title="Permalink to this heading"> ¶ </a> </h1> @@ -13,7 +13,7 @@ <h1> </span> <h2> A Sub-Heading in Include - <a class="headerlink" href="#a-sub-heading-in-include" title="Permalink to this headline"> + <a class="headerlink" href="#a-sub-heading-in-include" title="Permalink to this heading"> ¶ </a> </h2> @@ -27,7 +27,7 @@ <h2> <section id="a-sub-heading-in-nested-include"> <h2> A Sub-Heading in Nested Include - <a class="headerlink" href="#a-sub-heading-in-nested-include" title="Permalink to this headline"> + <a class="headerlink" href="#a-sub-heading-in-nested-include" title="Permalink to this heading"> ¶ </a> </h2> @@ -120,7 +120,7 @@ <h2> <section id="a-sub-sub-heading"> <h3> A Sub-sub-Heading - <a class="headerlink" href="#a-sub-sub-heading" title="Permalink to this headline"> + <a class="headerlink" href="#a-sub-sub-heading" title="Permalink to this heading"> ¶ </a> </h3> diff --git a/tests/test_sphinx/test_sphinx_builds/test_includes.sphinx3.html b/tests/test_sphinx/test_sphinx_builds/test_includes.sphinx3.html deleted file mode 100644 index d3f22324..00000000 --- a/tests/test_sphinx/test_sphinx_builds/test_includes.sphinx3.html +++ /dev/null @@ -1,131 +0,0 @@ -<div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body" role="main"> - <div class="section" id="main-title"> - <h1> - Main Title - <a class="headerlink" href="#main-title" title="Permalink to this headline"> - ¶ - </a> - </h1> - <div class="section" id="a-sub-heading-in-include"> - <span id="inc-header"> - </span> - <h2> - A Sub-Heading in Include - <a class="headerlink" href="#a-sub-heading-in-include" title="Permalink to this headline"> - ¶ - </a> - </h2> - <p> - Some text with - <em> - syntax - </em> - </p> - </div> - <div class="section" id="a-sub-heading-in-nested-include"> - <h2> - A Sub-Heading in Nested Include - <a class="headerlink" href="#a-sub-heading-in-nested-include" title="Permalink to this headline"> - ¶ - </a> - </h2> - <p> - Some other text with - <strong> - syntax - </strong> - </p> - <p> - This relative path will refer to the importing file: - </p> - <div class="figure align-default" id="id1"> - <img alt="_images/example1.jpg" src="_images/example1.jpg"/> - <p class="caption"> - <span class="caption-text"> - Caption - </span> - <a class="headerlink" href="#id1" title="Permalink to this image"> - ¶ - </a> - </p> - </div> - <p> - This absolute path will refer to the project root (where the - <code class="docutils literal notranslate"> - <span class="pre"> - conf.py - </span> - </code> - is): - </p> - <div class="figure align-default" id="id2"> - <img alt="_images/example2.jpg" src="_images/example2.jpg"/> - <p class="caption"> - <span class="caption-text"> - Caption - </span> - <a class="headerlink" href="#id2" title="Permalink to this image"> - ¶ - </a> - </p> - </div> - <p> - <img alt="alt" src="_images/example2.jpg"/> - </p> - <p> - <img alt="alt" src="https://example.com"/> - </p> - <p> - <a class="reference internal" href="#"> - <span class="doc std std-doc"> - text - </span> - </a> - </p> - <p> - <a class="reference internal" href="#inc-header"> - <span class="std std-ref"> - A Sub-Heading in Include - </span> - </a> - </p> - <div class="code python highlight-default notranslate"> - <div class="highlight"> - <pre><span></span><span class="k">def</span> <span class="nf">a_func</span><span class="p">(</span><span class="n">param</span><span class="p">):</span> - <span class="nb">print</span><span class="p">(</span><span class="n">param</span><span class="p">)</span> -</pre> - </div> - </div> - <pre class="code python literal-block"><code><span class="ln">0 </span><span class="keyword">def</span> <span class="name function">a_func</span><span class="punctuation">(</span><span class="name">param</span><span class="punctuation">):</span> -<span class="ln">1 </span> <span class="name builtin">print</span><span class="punctuation">(</span><span class="name">param</span><span class="punctuation">)</span></code></pre> - <div class="highlight-default notranslate"> - <div class="highlight"> - <pre><span></span><span class="n">This</span> <span class="n">should</span> <span class="n">be</span> <span class="o">*</span><span class="n">literal</span><span class="o">*</span> - -<span class="n">Lots</span> -<span class="n">of</span> -<span class="n">lines</span> -<span class="n">so</span> <span class="n">we</span> <span class="n">can</span> <span class="n">select</span> <span class="n">some</span> -</pre> - </div> - </div> - <pre class="literal-block" id="literal-ref"><span class="ln">0 </span>Lots -<span class="ln">1 </span>of</pre> - <div class="section" id="a-sub-sub-heading"> - <h3> - A Sub-sub-Heading - <a class="headerlink" href="#a-sub-sub-heading" title="Permalink to this headline"> - ¶ - </a> - </h3> - <p> - some more text - </p> - </div> - </div> - </div> - </div> - </div> -</div> diff --git a/tests/test_sphinx/test_sphinx_builds/test_includes.sphinx3.xml b/tests/test_sphinx/test_sphinx_builds/test_includes.sphinx3.xml deleted file mode 100644 index aee98fee..00000000 --- a/tests/test_sphinx/test_sphinx_builds/test_includes.sphinx3.xml +++ /dev/null @@ -1,113 +0,0 @@ -<document source="index.md"> - <section ids="main-title" names="main\ title"> - <title> - Main Title - <target refid="inc-header"> - <section ids="a-sub-heading-in-include inc-header" names="a\ sub-heading\ in\ include inc_header"> - <title> - A Sub-Heading in Include - <paragraph> - Some text with - <emphasis> - syntax - <section ids="a-sub-heading-in-nested-include" names="a\ sub-heading\ in\ nested\ include"> - <title> - A Sub-Heading in Nested Include - <paragraph> - Some other text with - <strong> - syntax - <paragraph> - This relative path will refer to the importing file: - <figure align="default" ids="id1"> - <image candidates="{'*': 'example1.jpg'}" uri="example1.jpg"> - <caption> - Caption - <paragraph> - This absolute path will refer to the project root (where the - <literal> - conf.py - is): - <figure align="default" ids="id2"> - <image candidates="{'*': 'subfolder/example2.jpg'}" uri="subfolder/example2.jpg"> - <caption> - Caption - <paragraph> - <image alt="alt" candidates="{'*': 'subfolder/example2.jpg'}" uri="subfolder/example2.jpg"> - <paragraph> - <image alt="alt" candidates="{'?': 'https://example.com'}" uri="https://example.com"> - <paragraph> - <pending_xref refdoc="index" refdomain="True" refexplicit="True" reftarget="index.md" reftype="myst" refwarn="True"> - <inline classes="xref myst"> - text - <paragraph> - <pending_xref refdoc="index" refdomain="std" refexplicit="False" reftarget="inc_header" reftype="ref" refwarn="True"> - <inline classes="xref std std-ref"> - inc_header - <literal_block classes="code python" source="include_code.py" xml:space="preserve"> - <inline classes="keyword"> - def - - <inline classes="name function"> - a_func - <inline classes="punctuation"> - ( - <inline classes="name"> - param - <inline classes="punctuation"> - ): - - - <inline classes="name builtin"> - print - <inline classes="punctuation"> - ( - <inline classes="name"> - param - <inline classes="punctuation"> - ) - <literal_block classes="code python" source="include_code.py" xml:space="preserve"> - <inline classes="ln"> - 0 - <inline classes="keyword"> - def - - <inline classes="name function"> - a_func - <inline classes="punctuation"> - ( - <inline classes="name"> - param - <inline classes="punctuation"> - ): - - <inline classes="ln"> - 1 - - <inline classes="name builtin"> - print - <inline classes="punctuation"> - ( - <inline classes="name"> - param - <inline classes="punctuation"> - ) - <literal_block source="include_literal.txt" xml:space="preserve"> - This should be *literal* - - Lots - of - lines - so we can select some - <literal_block ids="literal-ref" names="literal_ref" source="include_literal.txt" xml:space="preserve"> - <inline classes="ln"> - 0 - Lots - <inline classes="ln"> - 1 - of - <section ids="a-sub-sub-heading" names="a\ sub-sub-heading"> - <title> - A Sub-sub-Heading - <paragraph> - some more text diff --git a/tests/test_sphinx/test_sphinx_builds/test_includes.sphinx4.xml b/tests/test_sphinx/test_sphinx_builds/test_includes.xml similarity index 100% rename from tests/test_sphinx/test_sphinx_builds/test_includes.sphinx4.xml rename to tests/test_sphinx/test_sphinx_builds/test_includes.xml diff --git a/tests/test_sphinx/test_sphinx_builds/test_references.sphinx4.html b/tests/test_sphinx/test_sphinx_builds/test_references.html similarity index 98% rename from tests/test_sphinx/test_sphinx_builds/test_references.sphinx4.html rename to tests/test_sphinx/test_sphinx_builds/test_references.html index 677256e3..a6d4036f 100644 --- a/tests/test_sphinx/test_sphinx_builds/test_references.sphinx4.html +++ b/tests/test_sphinx/test_sphinx_builds/test_references.html @@ -12,7 +12,7 @@ <h1> <span class="math notranslate nohighlight"> \(a=1\) </span> - <a class="headerlink" href="#title-with-nested-a-1" title="Permalink to this headline"> + <a class="headerlink" href="#title-with-nested-a-1" title="Permalink to this heading"> ¶ </a> </h1> @@ -129,7 +129,7 @@ <h2> <em> anchors </em> - <a class="headerlink" href="#title-anchors" title="Permalink to this headline"> + <a class="headerlink" href="#title-anchors" title="Permalink to this heading"> ¶ </a> </h2> diff --git a/tests/test_sphinx/test_sphinx_builds/test_references.sphinx3.html b/tests/test_sphinx/test_sphinx_builds/test_references.sphinx3.html deleted file mode 100644 index acd217fd..00000000 --- a/tests/test_sphinx/test_sphinx_builds/test_references.sphinx3.html +++ /dev/null @@ -1,195 +0,0 @@ -<div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body" role="main"> - <div class="tex2jax_ignore mathjax_ignore section" id="title-with-nested-a-1"> - <span id="title"> - </span> - <h1> - Title with - <strong> - nested - </strong> - <span class="math notranslate nohighlight"> - \(a=1\) - </span> - <a class="headerlink" href="#title-with-nested-a-1" title="Permalink to this headline"> - ¶ - </a> - </h1> - <p> - <a class="reference external" href="https://example.com"> - </a> - </p> - <p> - <a class="reference external" href="https://example.com"> - plain text - </a> - </p> - <p> - <a class="reference external" href="https://example.com"> - nested - <em> - syntax - </em> - </a> - </p> - <p> - <a class="reference internal" href="#title"> - <span class="std std-ref"> - Title with nested a=1 - </span> - </a> - </p> - <p> - <a class="reference internal" href="#title"> - <span class="std std-ref"> - plain text - </span> - </a> - </p> - <p> - <a class="reference internal" href="#title"> - <span class="std std-ref"> - nested - <em> - syntax - </em> - </span> - </a> - </p> - <p> - <a class="reference internal" href="#"> - <span class="doc std std-doc"> - Title with nested a=1 - </span> - </a> - </p> - <p> - <a class="reference internal" href="#"> - <span class="doc std std-doc"> - plain text - </span> - </a> - </p> - <p> - <a class="reference internal" href="#"> - <span class="doc std std-doc"> - nested - <em> - syntax - </em> - </span> - </a> - </p> - <p> - <a class="reference download internal" download="" href="_downloads/ab0d698fdd2b6a81c34b5ed380fe6f61/file_link.txt"> - <span class="xref download myst"> - download - <strong> - link - </strong> - </span> - </a> - </p> - <p> - <a class="reference download internal" download="" href="_downloads/1952147a8403903cb78cecf56f049085/file_link2.txt"> - <span class="xref download myst"> - subfolder/file_link2.txt - </span> - </a> - </p> - <p id="insidecodeblock"> - I am inside the eval-rst fence - </p> - <p> - Referencing the - <a class="reference internal" href="#title"> - <span class="std std-ref"> - Title with nested a=1 - </span> - </a> - </p> - <p> - Still inside the codeblock - <a class="reference internal" href="#insidecodeblock"> - insidecodeblock - </a> - </p> - <p> - I am outside the - <a class="reference internal" href="#insidecodeblock"> - <span class="std std-ref"> - fence - </span> - </a> - </p> - <div class="section" id="title-anchors"> - <h2> - Title - <em> - anchors - </em> - <a class="headerlink" href="#title-anchors" title="Permalink to this headline"> - ¶ - </a> - </h2> - <div class="toctree-wrapper compound"> - <ul> - <li class="toctree-l1"> - <a class="reference internal" href="other.html"> - Title - <em> - anchors - </em> - </a> - </li> - <li class="toctree-l1"> - <a class="reference internal" href="subfolder/other2.html"> - Title - <em> - anchors - </em> - </a> - </li> - </ul> - </div> - <p> - <a class="reference internal" href="#title-anchors"> - <span class="std std-doc"> - Title anchors - </span> - </a> - </p> - <p> - <a class="reference internal" href="#title-anchors"> - <span class="std std-doc"> - Title anchors - </span> - </a> - </p> - <p> - <a class="reference internal" href="other.html#title-anchors"> - <span class="std std-doc"> - Title anchors - </span> - </a> - </p> - <p> - <a class="reference internal" href="other.html#title-anchors"> - <span class="std std-doc"> - Title anchors - </span> - </a> - </p> - <p> - <a class="reference internal" href="subfolder/other2.html#title-anchors"> - <span class="std std-doc"> - Title anchors - </span> - </a> - </p> - </div> - </div> - </div> - </div> -</div> diff --git a/tests/test_sphinx/test_sphinx_builds/test_references_singlehtml.sphinx4.html b/tests/test_sphinx/test_sphinx_builds/test_references_singlehtml.html similarity index 96% rename from tests/test_sphinx/test_sphinx_builds/test_references_singlehtml.sphinx4.html rename to tests/test_sphinx/test_sphinx_builds/test_references_singlehtml.html index 23ff49f9..b3d98a97 100644 --- a/tests/test_sphinx/test_sphinx_builds/test_references_singlehtml.sphinx4.html +++ b/tests/test_sphinx/test_sphinx_builds/test_references_singlehtml.html @@ -4,7 +4,7 @@ <section id="title"> <h1> Title - <a class="headerlink" href="#title" title="Permalink to this headline"> + <a class="headerlink" href="#title" title="Permalink to this heading"> ¶ </a> </h1> @@ -14,7 +14,7 @@ <h1> <section id="other-index"> <h2> Other Index - <a class="headerlink" href="#other-index" title="Permalink to this headline"> + <a class="headerlink" href="#other-index" title="Permalink to this heading"> ¶ </a> </h2> @@ -24,7 +24,7 @@ <h2> <section id="other-title"> <h3> Other Title - <a class="headerlink" href="#other-title" title="Permalink to this headline"> + <a class="headerlink" href="#other-title" title="Permalink to this heading"> ¶ </a> </h3> @@ -62,7 +62,7 @@ <h3> <section id="other-2-title"> <h3> Other 2 Title - <a class="headerlink" href="#other-2-title" title="Permalink to this headline"> + <a class="headerlink" href="#other-2-title" title="Permalink to this heading"> ¶ </a> </h3> diff --git a/tests/test_sphinx/test_sphinx_builds/test_references_singlehtml.sphinx3.html b/tests/test_sphinx/test_sphinx_builds/test_references_singlehtml.sphinx3.html deleted file mode 100644 index 57f1e159..00000000 --- a/tests/test_sphinx/test_sphinx_builds/test_references_singlehtml.sphinx3.html +++ /dev/null @@ -1,111 +0,0 @@ -<div class="documentwrapper"> - <div class="bodywrapper"> - <div class="body" role="main"> - <div class="section" id="title"> - <h1> - Title - <a class="headerlink" href="#title" title="Permalink to this headline"> - ¶ - </a> - </h1> - <div class="toctree-wrapper compound"> - <span id="document-other/index"> - </span> - <div class="section" id="other-index"> - <h2> - Other Index - <a class="headerlink" href="#other-index" title="Permalink to this headline"> - ¶ - </a> - </h2> - <div class="toctree-wrapper compound"> - <span id="document-other/other"> - </span> - <div class="section" id="other-title"> - <h3> - Other Title - <a class="headerlink" href="#other-title" title="Permalink to this headline"> - ¶ - </a> - </h3> - <p> - <a class="reference internal" href="index.html#document-other/other2"> - <span class="doc"> - Other 2 Title - </span> - </a> - </p> - <p> - <a class="reference internal" href="index.html#document-other/other2"> - <span class="doc"> - Other 2 Title - </span> - </a> - </p> - <p> - <a class="reference internal" href="index.html#document-other/other2"> - <span class="doc std std-doc"> - Other 2 Title - </span> - </a> - </p> - <p> - <a class="reference internal" href="index.html#title"> - <span class="std std-doc"> - Title - </span> - </a> - </p> - </div> - <span id="document-other/other2"> - </span> - <div class="section" id="other-2-title"> - <h3> - Other 2 Title - <a class="headerlink" href="#other-2-title" title="Permalink to this headline"> - ¶ - </a> - </h3> - </div> - </div> - </div> - </div> - <p> - <a class="reference internal" href="index.html#document-other/other"> - <span class="doc"> - Other Title - </span> - </a> - </p> - <p> - <a class="reference internal" href="index.html#document-other/other"> - <span class="doc"> - Other Title - </span> - </a> - </p> - <p> - <a class="reference internal" href="index.html#document-other/other"> - <span class="doc std std-doc"> - Other Title - </span> - </a> - </p> - <p> - <a class="reference internal" href="#title"> - <span class="std std-doc"> - Title - </span> - </a> - </p> - <p> - <a class="reference internal" href="index.html#other-title"> - <span class="std std-doc"> - Other Title - </span> - </a> - </p> - </div> - </div> - </div> -</div> diff --git a/tox.ini b/tox.ini index 6c20b695..4a0110e6 100644 --- a/tox.ini +++ b/tox.ini @@ -11,12 +11,12 @@ # then then deleting compiled files has been found to fix it: `find . -name \*.pyc -delete` [tox] -envlist = py37-sphinx4 +envlist = py37-sphinx5 [testenv] usedevelop = true -[testenv:py{37,38,39,310}-sphinx{3,4}] +[testenv:py{37,38,39,310}-sphinx{4,5}] deps = black flake8 @@ -24,7 +24,7 @@ extras = linkify testing commands_pre = - sphinx3: pip install --quiet --upgrade-strategy "only-if-needed" "sphinx==3.5.4" + sphinx4: pip install --quiet --upgrade-strategy "only-if-needed" "sphinx==4.5.0" commands = pytest {posargs} [testenv:docs-{update,clean}] @@ -57,7 +57,6 @@ addopts = --ignore=setup.py markers = sphinx: set parameters for the sphinx `app` fixture (see ipypublish/sphinx/tests/conftest.py) filterwarnings = - ignore::DeprecationWarning:sphinx.jinja2glue.* [flake8] max-line-length = 100