diff --git a/mermaid2/plugin.py b/mermaid2/plugin.py index 54c8bd9..235db1a 100755 --- a/mermaid2/plugin.py +++ b/mermaid2/plugin.py @@ -3,6 +3,7 @@ """ import os +import functools from mkdocs.plugins import BasePlugin @@ -178,6 +179,8 @@ def activate_custom_loader(self) -> bool: custom_fences = superfence_config.get('custom_fences', []) for fence in custom_fences: format_fn = fence.get('format') + if type(format_fn) is functools.partial: + format_fn = format_fn.func if format_fn.__name__ == CUSTOM_FENCE_FN: self._activate_custom_loader = True info("Found '%s' function: "