Modify

Opened 13 years ago

Last modified 5 years ago

#9235 new enhancement

Allow the line numbers to be specified using TracLinks syntax

Reported by: Ryan J Ollos Owned by:
Priority: normal Component: CodeExampleMacro
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

Matching a regex is pretty error prone and there are several characters that prevent a match from occurring, probably because they are not property escaped in the CodeExampleMacro code (e.g. //, but these errors should be the subject of a different ticket).

For this ticket, I'm requesting the ability to skip the regex and just provide a start index and number of lines, using TracLinks#source:links syntax.

The syntax would be, e.g.: path=/path/to/file.cpp@1678:10-20, to show lines 10-20 of file.cpp at revision 1678. Alternatively, it could look like path=/path/to/file.cpp@1678#L10 or path=/path/to/file.cpp@1678#L10-20, since there is not necessarily an obvious relationship between TracLinks syntax and that which would be used by this macro. Using the syntax in one of the latter examples would also leave open the possibility of using the :10-20 syntax for highlighting a section of code within the code block displayed by this macro.

Attachments (0)

Change History (2)

comment:1 Changed 11 years ago by Ryan J Ollos

Owner: changed from Alexander Slesarev to Ryan J Ollos
Status: newassigned

comment:2 Changed 5 years ago by Ryan J Ollos

Owner: Ryan J Ollos deleted
Status: assignednew

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.