Opened 7 years ago

# Allow the line numbers to be specified using TracLinks syntax

Reported by: Owned by: Ryan J Ollos Ryan J Ollos normal CodeExampleMacro normal 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.

### comment:1 Changed 4 years ago by Ryan J Ollos

Owner: changed from Alexander Slesarev to Ryan J Ollos new → assigned

### Modify Ticket

Change Properties