Summary: JavaScript minification breaks production when line
                    starts with slashe in block comments
           Product: MediaWiki
           Version: 1.18-svn
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: critical
          Priority: Normal
         Component: Resource Loader

The following code
 * Foobar:
 * {
 * 'ltr' : {
 * //Multiple rules with configurable operators
 * 'iphone' : false
 * }
 * @return Boolean true lorem ipsum
Is minified as:
*//Multiple rules with configurable operators
*@return Boolean true lorem ipsum

The following line specifically is where it all breaks:
*//Multiple rules with configurable operators

Because it is considered as the closure of the block comment " */ " and the
(unexpected) start of a regex.

"Error: unterminated regular expression literal"
Source File:

Thanks to TranslateWiki Nikerabbit for reporting this on IRC.

I'm confused though that this is production output, why are there comments in
production output ?
That empty lines were insterted in place of comments (before the minifier
switch by Trevor[0]) to keep track of the line number (although that only
applies to the first file of all loaded modules) was one, but keeping all
comments ? We might as well disable the minifier then.



Configure bugmail:
------- You are receiving this mail because: -------
You are on the CC list for the bug.

Wikibugs-l mailing list

Reply via email to