Subject: | "unterminated regular expression literal" when using CDATA without slash afterwards |
On perl5.10/win32:
This was a bit tough to track down, but if I load and try to minimize a
file containing these lines:
""+<r><![CDATA[
]]></r>;
...then I get the following error:
unterminated regular expression literal, stopped at
JavaScript/Minifier.pm line 151.
However, if I add any line to the file involving a slash, it works:
""+<r><![CDATA[
]]></r>;
2/2;
...gets me no error. Also, stripDebug makes no difference, it still
breaks without the slash, and is fine when it's there.
This isn't actually critical for me, because I had been using this CDATA
setup to embed CSS in my JS files, which I'll now be separating out
again so that I can minify the CSS as well. But since I encountered it,
and this is valid JavaScript, I thought I should report it.