Skip to content

Commit

Permalink
replace page with parser_extras (#494)
Browse files Browse the repository at this point in the history
* replace page with parser_extras
Fixes #493

* Format and lint with Ruff

---------

Co-authored-by: Ruff <[email protected]>
  • Loading branch information
kjaymiller and Ruff committed Dec 21, 2023
1 parent e294ef8 commit e5550a3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/render_engine/page.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,4 +172,4 @@ def __init__(
@property
def _content(self):
"""Returns the content of the page."""
return self.Parser.parse(self.content, page=self)
return self.Parser.parse(self.content, extras=getattr(self, "parser_extras", {}))
2 changes: 1 addition & 1 deletion tests/test_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,4 @@ def test_rendered_page_from_template_has_attributes():
class CustomPage(Page):
template = environment.get_template("test.html")

assert CustomPage()._render_from_template(template=CustomPage.template) == "CustomPage-custompage-/custompage.html"
assert CustomPage()._render_from_template(template=CustomPage.template) == "CustomPage-custompage-/custompage.html"

0 comments on commit e5550a3

Please sign in to comment.