stop rendering mathjax by default in displacy (#4840)

* stop rendering mathjax by default in displacy

* Replace f-string and add comment

Co-authored-by: Ines Montani <ines@ines.io>
This commit is contained in:
Al Johri 2020-01-01 07:15:05 -05:00 committed by Ines Montani
parent db9257559c
commit 1aa2d4dac9

View File

@ -55,9 +55,10 @@ def render(
html = RENDER_WRAPPER(html) html = RENDER_WRAPPER(html)
if jupyter or (jupyter is None and is_in_jupyter()): if jupyter or (jupyter is None and is_in_jupyter()):
# return HTML rendered by IPython display() # return HTML rendered by IPython display()
# See #4840 for details on span wrapper to disable mathjax
from IPython.core.display import display, HTML from IPython.core.display import display, HTML
return display(HTML(html)) return display(HTML('<span class="tex2jax_ignore">{}</span>'.format(html)))
return html return html