Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#52768 closed enhancement (fixed)

Trac: add support for syntax highlighting

Reported by: mojca (Mojca Miklavec) Owned by: neverpanic (Clemens Lang)
Priority: Low Milestone:
Component: server/hosting Version:
Keywords: Cc: neverpanic (Clemens Lang), raimue (Rainer Müller), mkae (Marko Käning)
Port: trac

Description (last modified by mojca (Mojca Miklavec))

I would like to request support for syntax highlighting in the source browser.

According to TracSyntaxColoring we should probably go for Enscript which is the only one with support for Tcl (even though it's missing support for php, xml and css, but one cannot have everything).

The official web site of pygments says they support Tcl. So it might be just an outdated wiki page on Trac.

Change History (10)

comment:1 Changed 8 years ago by mojca (Mojca Miklavec)

Description: modified (diff)

comment:2 Changed 8 years ago by mkae (Marko Käning)

Cc: mkae added

comment:3 Changed 8 years ago by neverpanic (Clemens Lang)

Owner: changed from admin@… to neverpanic
Status: newaccepted

This is probably as simple as installing pygments, since Trac already tries to import it on startup.

raimue: Any reason not to?

comment:4 Changed 8 years ago by raimue (Rainer Müller)

No objections.

Although linking to the GitHub browser should now be preferred over the one in Trac in my opinion.

comment:5 in reply to:  4 Changed 8 years ago by larryv (Lawrence Velázquez)

Agreed, but it’d also be nice for WikiProcessor-based code snippets in comments and such.

{{{
#!tcl
foreach word {highlight all the things} {
    puts $word
}
}}}

comment:6 Changed 8 years ago by raimue (Rainer Müller)

Resolution: fixed
Status: acceptedclosed

pygments 2.1.3 now installed.

Your example:

foreach word {highlight all the things} {
    puts $word
}

comment:7 Changed 8 years ago by mojca (Mojca Miklavec)

Wonderful, thank you!

comment:8 Changed 8 years ago by mkae (Marko Käning)

Cool, @larryv! Thanks a lot! :-)

comment:9 in reply to:  8 ; Changed 8 years ago by larryv (Lawrence Velázquez)

While I’m happy to take credit for anything and everything, I think you mean Rainer ;)

comment:10 in reply to:  9 Changed 8 years ago by mkae (Marko Käning)

Replying to larryv:

While I’m happy to take credit for anything and everything, I think you mean Rainer ;)

Sorry, my bad, yes, of course, I mean Rainer! o:-)

Note: See TracTickets for help on using tickets.