This commit is contained in:
Nihesh Rachakonda 2025-05-29 20:25:23 +08:00 committed by GitHub
commit f52c66f324
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -66,7 +66,10 @@ def render(
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 # See #4840 for details on span wrapper to disable mathjax
from IPython.core.display import HTML, display try:
from IPython.display import HTML, display
except ImportError:
from IPython.core.display import HTML, display
return display(HTML('<span class="tex2jax_ignore">{}</span>'.format(html))) return display(HTML('<span class="tex2jax_ignore">{}</span>'.format(html)))
return html return html