diff --git a/IPython/core/inputsplitter.py b/IPython/core/inputsplitter.py index b696464..ac14747 100644 --- a/IPython/core/inputsplitter.py +++ b/IPython/core/inputsplitter.py @@ -631,10 +631,6 @@ class IPythonInputSplitter(InputSplitter): if not lines_list: lines_list = [''] - # interpet trailing newline as a blank line - if lines.endswith('\n'): - lines_list += [''] - # Store raw source before applying any transformations to it. Note # that this must be done *after* the reset() call that would otherwise # flush the buffer. diff --git a/IPython/terminal/ptshell.py b/IPython/terminal/ptshell.py index d472a29..dee66b2 100644 --- a/IPython/terminal/ptshell.py +++ b/IPython/terminal/ptshell.py @@ -195,7 +195,7 @@ class TerminalInteractiveShell(InteractiveShell): b.newline() return - status, indent = self.input_splitter.check_complete(d.text) + status, indent = self.input_splitter.check_complete(d.text + '\n') if (status != 'incomplete') and b.accept_action.is_returnable: b.accept_action.validate_and_handle(event.cli, b)