diff --git a/IPython/core/debugger.py b/IPython/core/debugger.py index e0491a9..ad1e9ee 100644 --- a/IPython/core/debugger.py +++ b/IPython/core/debugger.py @@ -41,7 +41,6 @@ from IPython.core.excolors import exception_colors from IPython.testing.skipdoctest import skip_doctest -RGX_EXTRA_INDENT = re.compile('(?<=\n)\s+') prompt = 'ipdb> ' @@ -179,6 +178,9 @@ class Tracer(object): self.debugger.set_trace(sys._getframe().f_back) +RGX_EXTRA_INDENT = re.compile('(?<=\n)\s+') + + def strip_indentation(multiline_string): return RGX_EXTRA_INDENT.sub('', multiline_string)