Keep It Simple, Stupid | |
PerlMonks |
Re: Removing javascript commentsby cparker (Initiate) |
on Apr 11, 2008 at 19:29 UTC ( [id://679827]=note: print w/replies, xml ) | Need Help?? |
John Crockford's JSMin removes comments as part of the minifcation process. There's a Perl implementation of JSMin at CPAN. You could study how this implementation removes comments and try to duplicate it. (Of course, if your license is compatible with Perl's license, you could just lift the relevant portions from the module, but then you wouldn't be learning anything. :)
In Section
Seekers of Perl Wisdom
|
|