From 2da5abfd1c733ac3d7b0c9478d6ee88e3f1afee9 2012-01-13 05:07:22
From: Ernie French <ernie@gqpbj.com>
Date: 2012-01-13 05:07:22
Subject: [PATCH] don't insert extra newline for newline tokens.

---

diff --git a/IPython/utils/PyColorize.py b/IPython/utils/PyColorize.py
index f485782..e6d6ceb 100644
--- a/IPython/utils/PyColorize.py
+++ b/IPython/utils/PyColorize.py
@@ -217,10 +217,10 @@ class Parser:
         newpos = self.lines[srow] + scol
         self.pos = newpos + len(toktext)
 
-        # handle newlines
-        if toktext and toktype in [token.NEWLINE, tokenize.NL]:
-            owrite(linesep)
-            return
+        # handle newlines 
+        #if toktype in [token.NEWLINE, tokenize.NL]:
+        #    owrite(linesep)
+        #    return
 
         # send the original whitespace, if needed
         if newpos > oldpos: