Skip to content

Commit 7ab5eb9

Browse files
committed
#602893: add indicator for current line in cgitb that doesnt rely on styling alone.
1 parent 453d953 commit 7ab5eb9

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Lib/cgitb.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,11 @@ def reader(lnum=[lnum]):
141141
i = lnum - index
142142
for line in lines:
143143
num = small(' ' * (5-len(str(i))) + str(i)) + ' '
144-
line = '<tt>%s%s</tt>' % (num, pydoc.html.preformat(line))
145144
if i in highlight:
145+
line = '<tt>=&gt;%s%s</tt>' % (num, pydoc.html.preformat(line))
146146
rows.append('<tr><td bgcolor="#ffccee">%s</td></tr>' % line)
147147
else:
148+
line = '<tt>&nbsp;&nbsp;%s%s</tt>' % (num, pydoc.html.preformat(line))
148149
rows.append('<tr><td>%s</td></tr>' % grey(line))
149150
i += 1
150151

0 commit comments

Comments
 (0)