Changeset 30752
- Timestamp:
- 12/06/2014 09:23:12 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/formatting.php
r30681 r30752 289 289 290 290 // 9x9 (times), but never 0x9999 291 if ( 1 === preg_match( '/(?<=\d)x -?\d/', $curl ) ) {291 if ( 1 === preg_match( '/(?<=\d)x\d/', $curl ) ) { 292 292 // Searching for a digit is 10 times more expensive than for the x, so we avoid doing this one! 293 $curl = preg_replace( '/\b(\d(?(?<=0)[\d\.,]+|[\d\.,]*))x( -?\d[\d\.,]*)\b/', '$1×$2', $curl );293 $curl = preg_replace( '/\b(\d(?(?<=0)[\d\.,]+|[\d\.,]*))x(\d[\d\.,]*)\b/', '$1×$2', $curl ); 294 294 } 295 295 } -
trunk/tests/phpunit/tests/formatting/WPTexturize.php
r30449 r30752 803 803 "-123×1=-123", 804 804 ), 805 // @ticket 30445 805 806 array( 806 807 "-123x-1", 807 "-123 ×-1",808 "-123x-1", 808 809 ), 809 810 array(
Note: See TracChangeset
for help on using the changeset viewer.