From 1aa2d4dac9ef414b3388743c40cc65e4880f115a Mon Sep 17 00:00:00 2001 From: Al Johri Date: Wed, 1 Jan 2020 07:15:05 -0500 Subject: [PATCH] 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 --- spacy/displacy/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spacy/displacy/__init__.py b/spacy/displacy/__init__.py index d2ef21dbd..c17b80aef 100644 --- a/spacy/displacy/__init__.py +++ b/spacy/displacy/__init__.py @@ -55,9 +55,10 @@ def render( html = RENDER_WRAPPER(html) if jupyter or (jupyter is None and is_in_jupyter()): # return HTML rendered by IPython display() + # See #4840 for details on span wrapper to disable mathjax from IPython.core.display import display, HTML - return display(HTML(html)) + return display(HTML('{}'.format(html))) return html