Index: trunk/phase3/tests/phpunit/includes/libs/JavaScriptMinifierTest.php |
— | — | @@ -121,7 +121,7 @@ |
122 | 122 | $suffix = ',shortVarName=0;'; |
123 | 123 | |
124 | 124 | $input = $prefix . $num . $suffix; |
125 | | - $expected = $prefix . $num . "\n" . $suffix; |
| 125 | + $expected = $prefix . "\n" . $num . $suffix; |
126 | 126 | |
127 | 127 | $minified = JavaScriptMinifier::minify( $input ); |
128 | 128 | |
Index: trunk/phase3/includes/libs/JavaScriptMinifier.php |
— | — | @@ -504,7 +504,7 @@ |
505 | 505 | if ( $decimal > 2 ) { |
506 | 506 | return self::parseError($s, $end, 'The number has too many decimal points' ); |
507 | 507 | } |
508 | | - $end += strspn( $s, '0123456789', $end ) + 1; |
| 508 | + $end += strspn( $s, '0123456789', $end + 1 ) + $decimal; |
509 | 509 | } |
510 | 510 | $exponent = strspn( $s, 'eE', $end ); |
511 | 511 | if( $exponent ) { |