Edgewall Software
Modify

Opened 19 years ago

Closed 19 years ago

Last modified 18 years ago

#1798 closed enhancement (fixed)

Hyperlink anchors to line numbers

Reported by: clay@… Owned by: Christopher Lenz
Priority: normal Milestone: 0.9
Component: version control/browser Version: devel
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

Please consider the ability to link directly to a line number in a source code listing. Mini-patch provided below.

Index: api.py
===================================================================
--- api.py      (revision 1972)
+++ api.py      (working copy)
@@ -307,7 +307,7 @@
         return 'lineno', 'Line', 'Line numbers'
 
     def annotate_line(self, number, content):
-        return '<th id="l%s">%s</th>' % (number, number)
+        return '<th id="l%s"><a name="l%s" href="#l%s">%s</a></th>' % (number, number, number, number)
 
 
 class PlainTextRenderer(Component):

Attachments (0)

Change History (2)

comment:1 by Christopher Lenz, 19 years ago

Owner: changed from Jonas Borgström to Christopher Lenz
Status: newassigned

FYI, you don't need the name="l%s" part, that's already covered by the <th id="l%s">.

comment:2 by Christopher Lenz, 19 years ago

Resolution: fixed
Status: assignedclosed

Implemented in [1974].

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christopher Lenz.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christopher Lenz to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.