Skip to content

Commit 01a8245

Browse files
authored
fix: register Myst config values for compatibility with sphinx-substitution-extensions (#1552)
1 parent fec1329 commit 01a8245

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

extensions/sphinx-scylladb-markdown/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
author="David Garcia",
1616
author_email="hi@davidgarcia.dev",
1717
url="https://github.com/scylladb/sphinx-scylladb-theme",
18-
version="0.1.3",
18+
version="0.1.4",
1919
install_requires=[
2020
"sphinx >= 2.1",
2121
"recommonmark == 0.7.1",

extensions/sphinx-scylladb-markdown/sphinx_scylladb_markdown/__init__.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
from recommonmark.transform import AutoStructify
55

6-
__version__ = "0.1.3"
6+
__version__ = "0.1.4"
77

88

99
class BaseParser:
@@ -29,6 +29,17 @@ def setup(self):
2929
True,
3030
)
3131
self.app.add_transform(AutoStructify)
32+
33+
# FIX: Register Myst config values even when using Recommonmark.
34+
# This is required because sphinx-substitution-extensions
35+
# now unconditionally expect these values to exist.
36+
self.app.add_config_value(
37+
"myst_enable_extensions", ["colon_fence"], "env", [list]
38+
)
39+
self.app.add_config_value("myst_heading_anchors", 6, "env", [int])
40+
self.app.add_config_value("myst_substitutions", {}, "env", [dict])
41+
self.app.add_config_value("myst_sub_delimiters", ["{", "}"], "env", [list])
42+
3243
except ImportError:
3344
raise RuntimeError(
3445
"recommonmark and sphinx_markdown_tables are not installed!"

0 commit comments

Comments
 (0)