Add opt out from math in query string
This commit is contained in:
parent
5f06aa7e9b
commit
249fdad1bc
2 changed files with 3 additions and 3 deletions
4
app.py
4
app.py
|
|
@ -237,8 +237,8 @@ class PageRevision(BaseModel):
|
|||
@property
|
||||
def text(self):
|
||||
return self.textref.get_content()
|
||||
def html(self):
|
||||
return md(self.text, math=self.page.is_math_enabled)
|
||||
def html(self, *, math=True):
|
||||
return md(self.text, math=self.page.is_math_enabled and math)
|
||||
def human_pub_date(self):
|
||||
delta = datetime.datetime.now() - self.pub_date
|
||||
T = partial(get_string, g.lang)
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
{% block history_nav %}{% endblock %}
|
||||
|
||||
<div class="inner-content">
|
||||
{{ rev.html()|safe }}
|
||||
{{ rev.html(math = request.args.get('math') not in ['0', 'false', 'no', 'off'])|safe }}
|
||||
</div>
|
||||
|
||||
{% if p.tags %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue