diff --git a/src/markdown_exec/rendering.py b/src/markdown_exec/rendering.py index 921d068..eaec9c4 100644 --- a/src/markdown_exec/rendering.py +++ b/src/markdown_exec/rendering.py @@ -2,6 +2,7 @@ from __future__ import annotations +from itertools import chain from textwrap import indent from xml.etree.ElementTree import Element @@ -130,7 +131,8 @@ def run(self, root: Element): # noqa: D102,WPS231 def _mimic(md: Markdown) -> Markdown: md = getattr(md, "_original_md", md) new_md = Markdown() # noqa: WPS442 - new_md.registerExtensions(md.registeredExtensions + ["tables", "md_in_html"], {}) + extensions = list(chain(md.registeredExtensions, ["tables", "md_in_html"])) + new_md.registerExtensions(extensions, {}) new_md.treeprocessors.register( _IdPrependingTreeprocessor(md, ""), _IdPrependingTreeprocessor.name,