0

I installed pygments on my trac server. but the code is without colours on the ticket comments.

this is what i have on trac.ini :

[mimeviewer]
max_preview_size = 262144
mime_map = text/x-dylan:dylan,text/x-idl:ice,text/x-ada:ads:adb,text/x-               java:java,application/x-python:py python sage
pygments_default_style = trac
pygments_modes = text/plain:java:7
silvercity_modes =
tab_width = 8
treat_as_binary = application/octet-stream,application/pdf,application/postscript,application/msword,application/rtf,

this is what i am writing in the comments: {{{ #!java if(var=='true') { a ='hi'; } }}}

many thanks for your help

1 Answers1

0

It's unclear whether you've formatted your markup correctly. Please try:

{{{#!java 
if(var=='true') { a ='hi'; }
}}}

To confirm that Pygments is installed correctly, check the about page and make sure the version is listed in the System Information table.

Which version of Trac and which version of Pygments? You need Trac 1.0.3 or later (preferably 1.0.4) with Pygments 2.x. See #11796. You should install Pygments 1.6 if you are stuck with an earlier version of Trac.

RjOllos
  • 2,900
  • 1
  • 19
  • 29
  • hello, yes the code was ok. Trac version is 0.12.3 Pygments is not listed in System Information table. do you know how i can add it? – Luisa Mesquita Feb 13 '15 at 12:02
  • Using the information you reported in [#11961](trac.edgewall.org/ticket/11961): delete `/usr/local/lib64/python2.6/site-packages/Pygments-2.0.2-py2.6.egg` and `easy_install pygments==1.6`. – RjOllos Feb 13 '15 at 17:42