Modify

Opened 8 years ago

Closed 5 years ago

#460 closed enhancement (fixed)

wiki macro for quoting range of lines of source file

Reported by: anonymous Owned by: anybody
Priority: normal Component: Request-a-Hack
Severity: normal Keywords: wiki quote source
Cc: fcorreia@… Trac Release: 0.9

Description

I'd like to see a way to quote on a wiki page ranges of source code (using the nice source browser rendering to show line numbers etc). The macro would need to support TracLink-style reference to specific source file, specific version, specific line or range of lines or perhaps even multiple ranges of lines (non-neighboring ranges would create abbreviation line in quote block like "...").

This sort of thing would make implementation discussion on a wiki page much easier! :)

Attachments (0)

Change History (3)

comment:1 Changed 6 years ago by thatch

It's already possible to highlight lines in 0.11 -- do you want to extract the lines or is highlighting them enough?

http://trac.edgewall.org/browser/trunk/setup.py?marks=3-9,15#L1

comment:2 Changed 6 years ago by anonymous

  • Cc fcorreia@… added

comment:3 Changed 5 years ago by chrisheller

  • Resolution set to fixed
  • Status changed from new to closed

Take a look at IncludeSourcePartialPlugin. It doesn't support non-neighboring ranges (although it could with a bit of work), but otherwise seems to be what you want.

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from anybody. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.