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 5
5
import os
6
6
import queue
7
7
import uuid
8
- import re
9
8
import sys
10
9
import threading
11
10
import time
22
21
from IPython .core .display import HTML
23
22
from IPython .core .ultratb import FormattedTB
24
23
from retrying import retry
25
- from ansi2html import Ansi2HTMLConverter
26
24
from ipykernel .comm import Comm
27
25
import nest_asyncio
28
26
@@ -471,21 +469,7 @@ def _wrap_errors(error):
471
469
if self .inline_exceptions :
472
470
print (ansi_stacktrace )
473
471
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
489
473
490
474
@property
491
475
def active (self ):
Original file line number Diff line number Diff line change @@ -10,6 +10,5 @@ contextvars==2.4;python_version<"3.7"
10
10
typing_extensions>=4.1.1
11
11
requests
12
12
retrying
13
- ansi2html
14
13
nest-asyncio
15
14
setuptools
You can’t perform that action at this time.
0 commit comments