diff --git a/mkdocs_static_i18n/plugin.py b/mkdocs_static_i18n/plugin.py index 261a151..3e93591 100644 --- a/mkdocs_static_i18n/plugin.py +++ b/mkdocs_static_i18n/plugin.py @@ -159,12 +159,9 @@ def on_page_markdown(self, markdown, page, config, files): if "pymdownx.details" in config["markdown_extensions"]: marker = r"(?:\?{3}\+?|!{3})" # Admonition or Details marker - RE = re.compile( - r'^(' - + marker - + r' ?)([\w\-]+(?: +[\w\-]+)*)(?: +"(.*?)")? *$' - ) # Copied from https://github.com/Python-Markdown/markdown/blob/master/markdown/extensions/admonition.py and modified for a single-line processing - # Adapted to match the details extension as well + # Copied from https://github.com/Python-Markdown/markdown/blob/master/markdown/extensions/admonition.py and modified for a single-line processing + # Adapted to match the details extension as well + RE = re.compile('^(' + marker + r' ?)([\w\-]+(?: +[\w\-]+)*)(?: +"(.*?)")? *$') def handle_admonition_translations(line): m = RE.match(line)