http://www.perlmonks.org?node_id=334655


in reply to Re: Re: Re: Feature Request: Adding Colors to Source Code
in thread Feature Request: Adding Colors to Source Code

Bad solution. It would colour some Perl by accident, but what you're doing is nowhere near parsing Perl.

Only perl can really parse Perl correctly (and not even that), but what Syntax::Highlight::Perl and Perl::Tidy do comes much, much closer. (The latter is better, but the former is much faster/lighter and would because of that probably be better for this site. (Benchmarked a year or so ago, maybe things have changed since.)) Supporting Perl's quoting operators is very important; try doing that with Javascript :)

Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }

  • Comment on Re: Re: Re: Re: Feature Request: Adding Colors to Source Code