diff --git a/IPython/core/inputtransformer.py b/IPython/core/inputtransformer.py index b4ef3e6..ddddde3 100644 --- a/IPython/core/inputtransformer.py +++ b/IPython/core/inputtransformer.py @@ -381,13 +381,16 @@ def _strip_prompts(prompt_re): @CoroutineInputTransformer.wrap def classic_prompt(): """Strip the >>>/... prompts of the Python interactive shell.""" - prompt_re = re.compile(r'^(>>> ?|^\.\.\. ?)') + # FIXME: non-capturing version (?:...) usable? + prompt_re = re.compile(r'^(>>> ?|\.\.\. ?)') return _strip_prompts(prompt_re) @CoroutineInputTransformer.wrap def ipy_prompt(): """Strip IPython's In [1]:/...: prompts.""" - prompt_re = re.compile(r'^(In \[\d+\]: |^\ \ \ \.\.\.+: )') + # FIXME: non-capturing version (?:...) usable? + # FIXME: r'^(In \[\d+\]: | {3}\.{3,}: )' clearer? + prompt_re = re.compile(r'^(In \[\d+\]: |\ \ \ \.\.\.+: )') return _strip_prompts(prompt_re)