From be6d96273c0d28301acfff73f5c1624a98b4ccdf Mon Sep 17 00:00:00 2001 From: "Brian S. Stephan" Date: Wed, 3 Nov 2021 14:16:18 -0500 Subject: [PATCH] eliminate warnings about how we register the pydot markdown extension --- incorporealcms/mdx/pydot.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/incorporealcms/mdx/pydot.py b/incorporealcms/mdx/pydot.py index e644a58..3228b25 100644 --- a/incorporealcms/mdx/pydot.py +++ b/incorporealcms/mdx/pydot.py @@ -12,10 +12,9 @@ logger = logging.getLogger(__name__) class InlinePydot(markdown.Extension): """Wrap the markdown prepcoressor.""" - def extendMarkdown(self, md, md_globals): + def extendMarkdown(self, md): """Add InlinePydotPreprocessor to the Markdown instance.""" - md.registerExtension(self) - md.preprocessors.add('dot_block', InlinePydotPreprocessor(md), '_begin') + md.preprocessors.register(InlinePydotPreprocessor(md), 'dot_block', 100) class InlinePydotPreprocessor(markdown.preprocessors.Preprocessor):