highlighting PERL code with enscript
Jon Noack
noackjr at alumni.rice.edu
Mon Feb 23 13:55:07 PST 2004
On 10/20/2003 4:45 AM, Stefan Moessler wrote:
> i'm using cvsweb-2.9.1 with cygwin+apache2. Highlighting does not work
> for filenames ending with *.pl . I think there is a problem with the
> regex for filename matching of perl-programs in cvsweb.conf ($FreeBSD:
> projects/cvsweb/cvsweb.conf,v 1.62 2003/10/09 20:14:11 scop Exp $). The
> actual line in cvsweb.conf(596) is:
>
> %enscript_types =
> ...
> 'perl' => qr/\.p(m|(er?)l)$/io,
> ...
> );
This is still present in 2.9.3 (now line 567). I'm not an expert on
regex, but this looks to me like it matches .pm, .pel, and .perl
(ignoring case). Shouldn't the '?' be outside the parens:
'perl' => qr/\.p(m|(er)?l)$/io,
This should match .pm, .pl, and .perl (ignoring case). I have verified
that this fixes perl highlighting for me.
Jon Noack
More information about the freebsd-cvsweb
mailing list