Ticket #26850: miqro-26850-part2.patch
| File miqro-26850-part2.patch, 2.5 KB (added by , 12 years ago) |
|---|
-
src/wp-includes/formatting.php
109 109 110 110 // '99 '99s '99's (apostrophe) But never '9 or '999 or '99.0. 111 111 if ( "'" !== $apos ) { 112 $dynamic[ '/\'(?=\d\d(?:\Z|(?! \d|[.,]\d)))/' ] = $apos;112 $dynamic[ '/\'(?=\d\d(?:\Z|(?![%\d]|[.,]\d)))/' ] = $apos; 113 113 } 114 114 115 115 // Quoted Numbers like "42" or '42.00' 116 116 if ( '"' !== $opening_quote && '"' !== $closing_quote ) { 117 $dynamic[ '/(?<=\A|' . $spaces . ')"(\d[ \d\.\,]*)"/' ] = $opening_quote . '$1' . $closing_quote;117 $dynamic[ '/(?<=\A|' . $spaces . ')"(\d[.,\d]*)"/' ] = $opening_quote . '$1' . $closing_quote; 118 118 } 119 119 if ( "'" !== $opening_single_quote && "'" !== $closing_single_quote ) { 120 $dynamic[ '/(?<=\A|' . $spaces . ')\'(\d[ \d\.\,]*)\'/' ] = $opening_single_quote . '$1' . $closing_single_quote;120 $dynamic[ '/(?<=\A|' . $spaces . ')\'(\d[.,\d]*)\'/' ] = $opening_single_quote . '$1' . $closing_single_quote; 121 121 } 122 122 123 123 // Single quote at start, or preceded by (, {, <, [, ", -, or spaces. -
tests/phpunit/tests/formatting/WPTexturize.php
313 313 "word ’99’s word", 314 314 ), 315 315 array( 316 "according to our source, '33 % of allstudents scored less than 50' on the test.", // Apostrophes and primes have priority over quotes317 "according to our source, ’33 % of allstudents scored less than 50′ on the test.",316 "according to our source, '33 students scored less than 50' on the test.", // Apostrophes and primes have priority over quotes 317 "according to our source, ’33 students scored less than 50′ on the test.", 318 318 ), 319 319 ); 320 320 } … … 1060 1060 'word “4,242.00” word', 1061 1061 ), 1062 1062 array( 1063 "word '99's word", // Is this correct?1064 "word ̵ 6;99’s word",1063 "word '99's word", 1064 "word ’99’s word", 1065 1065 ), 1066 1066 array( 1067 1067 "word '99'samsonite", 1068 "word ̵ 6;99’samsonite",1068 "word ’99’samsonite", 1069 1069 ), 1070 1070 ); 1071 1071 } … … 1341 1341 "word ‘999 word", 1342 1342 ), 1343 1343 array( 1344 "word '99% word", 1345 "word ‘99% word", 1346 ), 1347 array( 1344 1348 "word '9 word", 1345 1349 "word ‘9 word", 1346 1350 ),