Edgewall Software

Ticket #1798 (closed enhancement: fixed)

Opened 3 years ago

Last modified 3 years ago

Hyperlink anchors to line numbers

Reported by: clay@… Owned by: cmlenz
Priority: normal Milestone: 0.9
Component: version control/browser Version: devel
Severity: normal Keywords:
Cc:

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

Change History

Changed 3 years ago by cmlenz

  • owner changed from jonas to cmlenz
  • status changed from new to assigned

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

Changed 3 years ago by cmlenz

  • status changed from assigned to closed
  • resolution set to fixed

Implemented in [1974].

Add/Change #1798 (Hyperlink anchors to line numbers)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.