From 2888f8be267f9fb0c463afbb582cfb79159986f8 2013-07-16 20:25:22 From: Jonathan Frederic Date: 2013-07-16 20:25:22 Subject: [PATCH] Fixed & simplified broken remove_ansi regex --- diff --git a/IPython/nbconvert/filters/ansi.py b/IPython/nbconvert/filters/ansi.py index 33d54d1..0206425 100644 --- a/IPython/nbconvert/filters/ansi.py +++ b/IPython/nbconvert/filters/ansi.py @@ -36,7 +36,7 @@ def remove_ansi(source): Source to remove the ansi from """ - return re.sub(r'\033\[(0|\d;\d\d)m', '', source) + return re.sub(r'\033\[(\d|:)+?m', '', source) def ansi2html(text):