From 8bce6aefa32028d9cdcafc6b6d6858d48886b34f Mon Sep 17 00:00:00 2001 From: Chris Sewell Date: Mon, 13 Jan 2025 10:30:36 +0100 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=94=A7=20Minor=20fix=20for=20sphinx?= =?UTF-8?q?=208.2=20compat?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit closes #1010 --- myst_parser/mdit_to_docutils/base.py | 5 +++-- tox.ini | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/myst_parser/mdit_to_docutils/base.py b/myst_parser/mdit_to_docutils/base.py index bdd15156..3778dd31 100644 --- a/myst_parser/mdit_to_docutils/base.py +++ b/myst_parser/mdit_to_docutils/base.py @@ -716,8 +716,9 @@ def render_fence(self, token: SyntaxTreeNode) -> None: if not name and self.sphinx_env is not None: # use the current highlight setting, via the ``highlight`` directive, # or ``highlight_language`` configuration. - name = self.sphinx_env.temp_data.get( - "highlight_language", self.sphinx_env.config.highlight_language + name = ( + self.sphinx_env.temp_data.get("highlight_language") + or self.sphinx_env.config.highlight_language ) lineno_start = 1 diff --git a/tox.ini b/tox.ini index 8c4e286f..dcead29a 100644 --- a/tox.ini +++ b/tox.ini @@ -20,6 +20,7 @@ usedevelop = true deps = sphinx7: sphinx>=7,<8 sphinx8: sphinx>=8,<9 + pygments<2.19 # TODO fix test regression with 2.19 extras = linkify testing From 65e3e4e7541cb836a4c9606acfdc19db56f0afec Mon Sep 17 00:00:00 2001 From: Chris Sewell Date: Mon, 13 Jan 2025 11:23:21 +0100 Subject: [PATCH 2/3] Update .readthedocs.yml --- .readthedocs.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.readthedocs.yml b/.readthedocs.yml index f3a5e31c..cb68e005 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -14,5 +14,6 @@ python: - rtd sphinx: + configuration: docs/conf.py builder: html fail_on_warning: true From 454da4b4c9e21e14e1d38d0de984dfde5ce88905 Mon Sep 17 00:00:00 2001 From: Chris Sewell Date: Mon, 13 Jan 2025 11:26:34 +0100 Subject: [PATCH 3/3] update --- pyproject.toml | 1 + tox.ini | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e72f84a8..e97dff7f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -75,6 +75,7 @@ testing = [ "pytest-regressions", "pytest-param-files~=0.6.0", "sphinx-pytest", + "pygments<2.19", # TODO fix test regression with 2.19" ] testing-docutils = [ "pygments", diff --git a/tox.ini b/tox.ini index dcead29a..8c4e286f 100644 --- a/tox.ini +++ b/tox.ini @@ -20,7 +20,6 @@ usedevelop = true deps = sphinx7: sphinx>=7,<8 sphinx8: sphinx>=8,<9 - pygments<2.19 # TODO fix test regression with 2.19 extras = linkify testing