##// END OF EJS Templates
Cleaner newline handling.
Gael Varoquaux -
Show More
@@ -156,10 +156,8 b' class LineFrontEndBase(FrontEndBase):'
156 if self.is_complete(cleaned_buffer):
156 if self.is_complete(cleaned_buffer):
157 self.execute(cleaned_buffer, raw_string=current_buffer)
157 self.execute(cleaned_buffer, raw_string=current_buffer)
158 else:
158 else:
159 if len(current_buffer.split('\n'))>2:
159 self.write(self._get_indent_string(current_buffer[:-1]))
160 # We need to clean the trailing '\n'
160 if current_buffer.rstrip().endswith(':'):
161 self.write(self._get_indent_string(current_buffer[:-1]))
162 else:
163 self.write('\t')
161 self.write('\t')
164
162
165
163
General Comments 0
You need to be logged in to leave comments. Login now