Index: trunk/phase3/tests/phpunit/includes/libs/JavaScriptMinifierTest.php |
— | — | @@ -114,7 +114,7 @@ |
115 | 115 | $suffix = ',shortVarName=0;'; |
116 | 116 | |
117 | 117 | $input = $prefix . $num . $suffix; |
118 | | - $expected = $prefix . "\n" . $num . $suffix; |
| 118 | + $expected = $prefix . $num . "\n" . $suffix; |
119 | 119 | |
120 | 120 | $minified = JavaScriptMinifier::minify( $input ); |
121 | 121 | |
Index: trunk/phase3/includes/libs/JavaScriptMinifier.php |
— | — | @@ -511,6 +511,7 @@ |
512 | 512 | if ( $exponent > 1 ) { |
513 | 513 | return self::parseError($s, $end, 'Number with several E' ); |
514 | 514 | } |
| 515 | + $end++; |
515 | 516 | |
516 | 517 | // + sign is optional; - sign is required. |
517 | 518 | $end += strspn( $s, '-+', $end ); |
— | — | @@ -518,7 +519,7 @@ |
519 | 520 | if ( !$len ) { |
520 | 521 | return self::parseError($s, $pos, 'No decimal digits after e, how many zeroes should be added?' ); |
521 | 522 | } |
522 | | - $end += $len + 1; |
| 523 | + $end += $len; |
523 | 524 | } |
524 | 525 | } elseif( isset( $opChars[$ch] ) ) { |
525 | 526 | // Punctuation character. Search for the longest matching operator. |