Syntax Coloring Pointers

View: New views
5 Messages — Rating Filter:   Alert me  

Syntax Coloring Pointers

by David Hogarty :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

This is not exactly on topic, but I don't know any better place to ask. I really admire the trac syntax highlighting, particularly the fact that as you resize the page, the lines wrap and the line numbers stay in the right place because you use a table and &nbsp; instead of the standard <pre> tags. I'm trying to read through the code to see where and how you do this so I can use the same technique for quoting small sections of code on a blog I'm creating. Can anyone give me some pointers on where to look? I can read the code fine, I just need to know what to read....

Thanks for your time, trac is an awesome product,

-Dave

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Development" group.
To post to this group, send email to trac-dev@...
To unsubscribe from this group, send email to trac-dev-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/trac-dev?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Syntax Coloring Pointers

by manuzhai :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Well, you could just look at Pygments (pygments.org), which is what
the development version of Trac uses (I forget what 0.10 used).

Cheers,

Manuzhai

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Development" group.
To post to this group, send email to trac-dev@...
To unsubscribe from this group, send email to trac-dev-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/trac-dev?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Syntax Coloring Pointers

by Emmanuel Blot :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


> Well, you could just look at Pygments (pygments.org), which is what
> the development version of Trac uses (I forget what 0.10 used).

0.10 and below use enscript and silvercity syntax highlighters.

Cheers,
Manu

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Development" group.
To post to this group, send email to trac-dev@...
To unsubscribe from this group, send email to trac-dev-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/trac-dev?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Syntax Coloring Pointers

by David Hogarty :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


I should have specified, I'm using pygments currently, but it doesn't
do the table layout in the same way. There's some kind of different
hackery going on to coerce to the layout trac uses. I think pygments
is just being called on each line... or something, haven't figured it
out yet.
-Dave

On Aug 30, 5:24 pm, "Emmanuel Blot" <manu.b...@...> wrote:
> > Well, you could just look at Pygments (pygments.org), which is what
> > the development version of Trac uses (I forget what 0.10 used).
>
> 0.10 and below use enscript and silvercity syntax highlighters.
>
> Cheers,
> Manu


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Development" group.
To post to this group, send email to trac-dev@...
To unsubscribe from this group, send email to trac-dev-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/trac-dev?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Syntax Coloring Pointers

by manuzhai :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On 8/30/07, Dave <david.hogarty@...> wrote:
> I should have specified, I'm using pygments currently, but it doesn't
> do the table layout in the same way. There's some kind of different
> hackery going on to coerce to the layout trac uses. I think pygments
> is just being called on each line... or something, haven't figured it
> out yet.

I think the mimeview package is what you're looking for, probably in
combination with some magic Genshi sprinkling.

Cheers,

Manuzhai

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Development" group.
To post to this group, send email to trac-dev@...
To unsubscribe from this group, send email to trac-dev-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/trac-dev?hl=en
-~----------~----~----~----~------~----~------~--~---