From 814205a64d7ee0d88bafefb8fa2df33ba9d7e886 Mon Sep 17 00:00:00 2001 From: Laurent Franceschetti Date: Sat, 2 Mar 2024 17:01:51 +0100 Subject: [PATCH] Push of missing files for #215 Files were missing --- mkdocs_macros/plugin.py | 9 +++++++-- setup.py | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/mkdocs_macros/plugin.py b/mkdocs_macros/plugin.py index 6061054..a2f1f63 100644 --- a/mkdocs_macros/plugin.py +++ b/mkdocs_macros/plugin.py @@ -786,8 +786,13 @@ def on_page_markdown(self, markdown, page, config, ) # Convert macros in the title from render (if exists) # to answer 144 - page.title = self.render(markdown=page.title, - force_rendering=force_rendering) + # There is a bizarre issue #215 where setting the title + # prevents interpretation of icons with pymdownx.emoji + debug("Page title:",page.title) + if "{" in page.title: + page.title = self.render(markdown=page.title, + force_rendering=force_rendering) + debug("Page title after macro rendering:",page.title) # execute the post-macro functions in the various modules for func in self.post_macro_functions: diff --git a/setup.py b/setup.py index 06f0963..0ceb7b5 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ # Initialization # -------------------- -VERSION_NUMBER = '1.1.0' +VERSION_NUMBER = '1.1.1' # required if you want to run document/test # pip install 'mkdocs-macros-plugin[test]'