Syntax highlighting broken.

Lukas Fleischer cgit at cryptocrack.de
Wed Aug 14 12:53:34 CEST 2013


On Wed, Aug 14, 2013 at 07:40:21AM +0200, Ferry Huberts wrote:
> We ship highlight in the example script. Without the corresponding css.
> FAIL.
> 
> Why on earth would we want to do that?
> Put the css back!

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.

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.

> 
> On 13/08/13 21:32, Jason A. Donenfeld wrote:
> > On Mon, Aug 12, 2013 at 1:23 PM, Ferry Huberts <mailings at hupie.com> wrote:
> >> Either do none of it, or do all of it. I vote for all of it.
> >>
> >> Please resurrect the css
> > 
> > Right now we don't ship any highlighting css by default. It's up to
> > the admin on how the css should be integrated, and what highlighting
> > engine is in use. Perhaps different highlighted files will want
> > different css. It may be more efficient to spit out a <link> to a
> > style sheet or the actual styles in <style> from the actual
> > highlighting engine rather than ship them globally on each in every
> > page in the global styles document.
> > 
> 
> -- 
> Ferry Huberts
> _______________________________________________
> CGit mailing list
> CGit at lists.zx2c4.com
> http://lists.zx2c4.com/mailman/listinfo/cgit


More information about the CGit mailing list