ipython/ipython — pull request #1247 by ernop (2012-01-09 04:57:47+00:00)
Title: fixes a bug causing extra newlines after # comments.

this fixes a bug where utils.PyColorize inserts an extra newline after comments in the formatted code listing.

an example:

test.py:
#
import ipdb;ipdb.set_trace()
print 5

before change:

$python test.py
> test.py(3)()
1 #
[extra line]
2 import ipdb;ipdb.set_trace()
----> 3 print 5

after change:

$python test.py
> test.py(3)()
1 #
2 import ipdb;ipdb.set_trace()
----> 3 print 5