]> granicus.if.org Git - python/commitdiff
#602893: add indicator for current line in cgitb that doesnt rely on styling alone.
authorGeorg Brandl <georg@python.org>
Sun, 5 Apr 2009 18:34:58 +0000 (18:34 +0000)
committerGeorg Brandl <georg@python.org>
Sun, 5 Apr 2009 18:34:58 +0000 (18:34 +0000)
Lib/cgitb.py

index 831f792e1d0d6bac92bf4cf9ab781396a0eaa246..35f4a50d5f5729acc6153e853dec08e3757ad8fa 100644 (file)
@@ -141,10 +141,11 @@ function calls leading up to the error, in the order they occurred.</p>'''
             i = lnum - index
             for line in lines:
                 num = small('&nbsp;' * (5-len(str(i))) + str(i)) + '&nbsp;'
-                line = '<tt>%s%s</tt>' % (num, pydoc.html.preformat(line))
                 if i in highlight:
+                    line = '<tt>=&gt;%s%s</tt>' % (num, pydoc.html.preformat(line))
                     rows.append('<tr><td bgcolor="#ffccee">%s</td></tr>' % line)
                 else:
+                    line = '<tt>&nbsp;&nbsp;%s%s</tt>' % (num, pydoc.html.preformat(line))
                     rows.append('<tr><td>%s</td></tr>' % grey(line))
                 i += 1