Skip to content

Commit

Permalink
fix when jinja2 needs "config" from other plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
fire1ce committed Jun 20, 2023
1 parent e7e69f9 commit 523fd8e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions external_markdown/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ def external_markdown(self, url: str, section_name: Optional[str] = None) -> str

return markdown

def on_page_markdown(self, markdown: str, **kwargs) -> str:
def on_page_markdown(self, markdown: str, config, **kwargs) -> str:
"""
Render the markdown content using the Jinja2 template engine.
"""
return Template(markdown).render(external_markdown=self.external_markdown)
return Template(markdown).render(external_markdown=self.external_markdown, config=config)

0 comments on commit 523fd8e

Please sign in to comment.