##// END OF EJS Templates
Fix inputsplitter to pass empty lines to transformers
Thomas Kluyver -
Show More
@@ -569,15 +569,14 b' class IPythonInputSplitter(InputSplitter):'
569 this value is also stored as a private attribute (_is_complete), so it
569 this value is also stored as a private attribute (_is_complete), so it
570 can be queried at any time.
570 can be queried at any time.
571 """
571 """
572 if not lines:
573 return super(IPythonInputSplitter, self).push(lines)
574
572
575 # We must ensure all input is pure unicode
573 # We must ensure all input is pure unicode
576 lines = cast_unicode(lines, self.encoding)
574 lines = cast_unicode(lines, self.encoding)
577
575
578 # The rest of the processing is for 'normal' content, i.e. IPython
576 # ''.splitlines() --> [], but we need to push the empty line to transformers
579 # source that we process through our transformations pipeline.
580 lines_list = lines.splitlines()
577 lines_list = lines.splitlines()
578 if not lines_list:
579 lines_list = ['']
581
580
582 # Transform logic
581 # Transform logic
583 #
582 #
General Comments 0
You need to be logged in to leave comments. Login now