mirror of
https://github.com/zensical/zensical.git
synced 2026-05-04 01:50:48 +00:00
zensical:fix - custom fences format function not resolved
Signed-off-by: squidfunk <martin.donath@squidfunk.com>
This commit is contained in:
@@ -421,8 +421,7 @@ def _apply_defaults(config: dict, path: str) -> dict:
|
||||
if isinstance(emoji.get("emoji_index"), str):
|
||||
emoji["emoji_index"] = _resolve(emoji.get("emoji_index"))
|
||||
|
||||
# Tabbed extension configuration - we need to resolve the slugification
|
||||
# function.
|
||||
# Tabbed extension configuration - resolve slugification function
|
||||
tabbed = config["mdx_configs"].get("pymdownx.tabbed", {})
|
||||
if isinstance(tabbed.get("slugify"), dict):
|
||||
object = tabbed["slugify"].get("object", "pymdownx.slugs.slugify")
|
||||
@@ -430,6 +429,12 @@ def _apply_defaults(config: dict, path: str) -> dict:
|
||||
_resolve(object), tabbed["slugify"].get("kwds")
|
||||
)
|
||||
|
||||
# Superfences extension configuration - resolve format function
|
||||
superfences = config["mdx_configs"].get("pymdownx.superfences", {})
|
||||
for fence in superfences.get("custom_fences", []):
|
||||
if isinstance(fence.get("format"), str):
|
||||
fence["format"] = _resolve(fence.get("format"))
|
||||
|
||||
# Ensure the table of contents title is initialized, as it's used inside
|
||||
# the template, and the table of contents extension is always defined
|
||||
config["mdx_configs"]["toc"].setdefault("title", None)
|
||||
|
||||
Reference in New Issue
Block a user