Syntax highlighting broken.
Ferry Huberts
mailings at hupie.com
Wed Aug 14 14:03:43 CEST 2013
On 14/08/13 13:47, Jason A. Smith wrote:
> On Wed, 2013-08-14 at 12:53 +0200, Lukas Fleischer wrote:
>> As you already said, it is an *example* script. It even includes a
>> comment mentioning that the CSS must be adapted when using that script:
>>
>> # Note: the highlight command (http://www.andre-simon.de/) uses css for syntax
>> # highlighting, so you'll probably want something like the following included
>> # in your css file (generated by highlight 2.4.8 and adapted for cgit):
>> #
>> # table.blob .num { color:#2928ff; }
>> # table.blob .esc { color:#ff00ff; }
>> # table.blob .str { color:#ff0000; }
>> # table.blob .dstr { color:#818100; }
>> # table.blob .slc { color:#838183; font-style:italic; }
>> # table.blob .com { color:#838183; font-style:italic; }
>> # table.blob .dir { color:#008200; }
>> # table.blob .sym { color:#000000; }
>> # table.blob .kwa { color:#000000; font-weight:bold; }
>> # table.blob .kwb { color:#830000; }
>> # table.blob .kwc { color:#000000; font-weight:bold; }
>> # table.blob .kwd { color:#010181; }
>>
>> I don't know what all the fuss is about.
>
> The fuss is because it was removed which broke what is currently the
> only was to achieve syntax highlighting for some. An easy way to restore
> the old working behavior would be preferable, without having to manually
> hack the default installed css. Manually editing a non-config file
> installed by a package is not the best way to go about doing things.
> Another config option, which could be used to select an additional css
> to be used for syntax highlighting would be more useful, and could be
> used by any of the highlighting methods now supported.
>
Since we're sort of fighting about it, I'm working on a patch to show
the different css-es for highlight 2.4, 2.6 and 3.8.
These are different, so maybe we should instead start assembling a
README.PACKAGERS that mentiones this difference and let them select the
correct css for their distribution.
Or we need to come up with a way to detect the highlight version and use
that to include the correct css.
patch will follow shortly
>> What we could do is add the style sheet back as a separate file and add
>> a commented out "@import" of that file to the main CSS. This might make
>> it a bit more convenient for administrators to reintroduce the colors. I
>> don't think it is absolutely needed, though, so this gets a +/-0 from
>> me.
>
> Still would require manually hacking a non-config file from an installed
> rpm package for us. The next time this package gets updated, it is
> broken again unless we remember to hack the file after the package is
> updated.
>
>
> _______________________________________________
> CGit mailing list
> CGit at lists.zx2c4.com
> http://lists.zx2c4.com/mailman/listinfo/cgit
>
--
Ferry Huberts
More information about the CGit
mailing list