From f50d57951c4f88edbd525db3260a1c6299f15ec4 Mon Sep 17 00:00:00 2001 From: Kevin Sheppard Date: Fri, 18 Aug 2023 12:09:39 +0100 Subject: [PATCH] MAINT: Switch markdown from recommonmark to MySt-parser --- docs/conf.py | 10 +--------- docs/markdown.md | 5 ++--- docs/requirements.txt | 4 ++-- 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 8f1fba8e6..e15dcd738 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -16,8 +16,6 @@ # sys.path.insert(0, os.path.abspath('.')) from distutils.version import LooseVersion -from recommonmark.transform import AutoStructify - import sphinx_material FORCE_CLASSIC = os.environ.get("SPHINX_MATERIAL_FORCE_CLASSIC", False) @@ -49,10 +47,10 @@ "sphinx.ext.mathjax", "sphinx.ext.viewcode", "nbsphinx", - "recommonmark", "sphinx_markdown_tables", "sphinx_copybutton", "sphinx_search.extension", + "myst_parser", ] autosummary_generate = True @@ -161,12 +159,6 @@ # Enable eval_rst in markdown def setup(app): - app.add_config_value( - "recommonmark_config", - {"enable_math": True, "enable_inline_math": True, "enable_eval_rst": True}, - True, - ) - app.add_transform(AutoStructify) app.add_object_type( "confval", "confval", diff --git a/docs/markdown.md b/docs/markdown.md index ec731d5ed..ae3bf1e6d 100644 --- a/docs/markdown.md +++ b/docs/markdown.md @@ -1,8 +1,7 @@ # Markdown -Sphinx can be configured to use markdown using the [recommonmark](https://github.com/readthedocs/recommonmark) -extension. recommonmark is strict and does not natively support tables or common extensions -to markdown. +Sphinx can be configured to use markdown using the [MyST-parser](https://github.com/executablebooks/MyST-Parser) +extension. --- diff --git a/docs/requirements.txt b/docs/requirements.txt index 7ba0c1ae4..1bceb1a24 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -8,7 +8,7 @@ jupyter_client notebook nbconvert ipykernel -recommonmark +myst-parser sphinx_markdown_tables sphinx-copybutton -readthedocs-sphinx-search \ No newline at end of file +readthedocs-sphinx-search