Permalink
Browse files

allow classic prompts without a space

>>>a=5
...b=10

etc.

closes #2790
  • Loading branch information...
1 parent 5393e81 commit 9286b88157d4281f075719fca8cb16a0ec8a1e85 @minrk committed Jan 18, 2013
Showing with 4 additions and 2 deletions.
  1. +1 −1 IPython/core/inputsplitter.py
  2. +3 −1 IPython/core/tests/test_inputsplitter.py
@@ -567,7 +567,7 @@ def transform_assign_magic(line):
return line
-_classic_prompt_re = re.compile(r'^([ \t]*>>> |^[ \t]*\.\.\. )')
+_classic_prompt_re = re.compile(r'^([ \t]*>>> ?|^[ \t]*\.\.\. ?)')
def transform_classic_prompt(line):
"""Handle inputs that start with '>>> ' syntax."""
@@ -456,10 +456,12 @@ def transform_checker(tests, func):
]],
classic_prompt =
- [('>>> x=1', 'x=1'),
+ [('>>> x=1', 'x=1'), # classic prompt
+ ('>>>x=1', 'x=1'), # classic prompt, no space
('x=1', 'x=1'), # normal input is unmodified
(' ', ' '), # blank lines are kept intact
('... ', ''), # continuation prompts
+ ('...x=1', 'x=1'), # continuation prompts, no space
],
ipy_prompt =

0 comments on commit 9286b88

Please sign in to comment.