Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Handle more of #2205
  • Loading branch information
ralsina committed Jan 4, 2016
1 parent 3fdc49f commit d9ea67f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion nikola/post.py
Expand Up @@ -257,8 +257,13 @@ def _has_pretty_url(self, lang):
@property
def is_mathjax(self):
"""True if this post has the mathjax tag in the current language or is a python notebook."""
if self.compiler.name == 'ipynb':
return True
lang = nikola.utils.LocaleBorg().current_lang
return ('mathjax' in self.tags_for_language(lang)) or (self.compiler.name == 'ipynb')
if self.is_translation_available(lang):
return 'mathjax' in self.tags_for_language(lang)
# If it has math in ANY other language, enable it. Better inefficient than broken.
return 'mathjax' in self.alltags

@property
def alltags(self):
Expand Down

0 comments on commit d9ea67f

Please sign in to comment.