Changeset 28765
- Timestamp:
- 06/17/2014 08:18:38 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/formatting.php
r28764 r28765 112 112 } 113 113 114 // '99 '99s '99's (apostrophe) But never '9 or '99 9 or '99.0.114 // '99 '99s '99's (apostrophe) But never '9 or '99% or '999 or '99.0. 115 115 if ( "'" !== $apos ) { 116 $dynamic[ '/\'(?=\d\d(?:\Z|(?! \d|[.,]\d)))/' ] = $apos;116 $dynamic[ '/\'(?=\d\d(?:\Z|(?![%\d]|[.,]\d)))/' ] = $apos; 117 117 } 118 118 119 119 // Quoted Numbers like "42" or '42.00' 120 120 if ( '"' !== $opening_quote && '"' !== $closing_quote ) { 121 $dynamic[ '/(?<=\A|' . $spaces . ')"(\d[ \d\.\,]*)"/' ] = $opening_quote . '$1' . $closing_quote;121 $dynamic[ '/(?<=\A|' . $spaces . ')"(\d[.,\d]*)"/' ] = $opening_quote . '$1' . $closing_quote; 122 122 } 123 123 if ( "'" !== $opening_single_quote && "'" !== $closing_single_quote ) { 124 $dynamic[ '/(?<=\A|' . $spaces . ')\'(\d[ \d\.\,]*)\'/' ] = $opening_single_quote . '$1' . $closing_single_quote;124 $dynamic[ '/(?<=\A|' . $spaces . ')\'(\d[.,\d]*)\'/' ] = $opening_single_quote . '$1' . $closing_single_quote; 125 125 } 126 126 -
trunk/tests/phpunit/tests/formatting/WPTexturize.php
r28764 r28765 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 ); … … 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 ); … … 1340 1340 "word '999 word", // Does not match the apos pattern, should be opening quote. 1341 1341 "word ‘999 word", 1342 ), 1343 array( 1344 "word '99% word", 1345 "word ‘99% word", 1342 1346 ), 1343 1347 array(
Note: See TracChangeset
for help on using the changeset viewer.