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 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/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",