File tree Expand file tree Collapse file tree 2 files changed +1
-18
lines changed
Expand file tree Collapse file tree 2 files changed +1
-18
lines changed Original file line number Diff line number Diff line change 55import os
66import queue
77import uuid
8- import re
98import sys
109import threading
1110import time
2221 from IPython .core .display import HTML
2322 from IPython .core .ultratb import FormattedTB
2423 from retrying import retry
25- from ansi2html import Ansi2HTMLConverter
2624 from ipykernel .comm import Comm
2725 import nest_asyncio
2826
@@ -471,21 +469,7 @@ def _wrap_errors(error):
471469 if self .inline_exceptions :
472470 print (ansi_stacktrace )
473471
474- # Use ansi2html to convert the colored ANSI string to HTML
475- conv = Ansi2HTMLConverter (scheme = "ansi2html" , dark_bg = False )
476- html_str = conv .convert (ansi_stacktrace )
477-
478- # Set width to fit 75-character wide stack trace and font to a size the
479- # won't require a horizontal scroll bar
480- html_str = html_str .replace (
481- "<html>" , '<html style="width: 75ch; font-size: 0.86em">'
482- )
483-
484- # Remove explicit background color so Dash dev-tools can set background
485- # color
486- html_str = re .sub ("background-color:[^;]+;" , "" , html_str )
487-
488- return html_str , 500
472+ return ansi_stacktrace , 500
489473
490474 @property
491475 def active (self ):
Original file line number Diff line number Diff line change @@ -10,6 +10,5 @@ contextvars==2.4;python_version<"3.7"
1010typing_extensions>=4.1.1
1111requests
1212retrying
13- ansi2html
1413nest-asyncio
1514setuptools
You can’t perform that action at this time.
0 commit comments