Changeset 28802
- Timestamp:
- 06/22/2014 10:12:47 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/formatting.php
r28776 r28802 215 215 $textarr = preg_split( $regex, $text, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY ); 216 216 217 $do_times_check = ( 1 === preg_match( '/(?<=\d)x-?\d/', $text ) );218 219 217 foreach ( $textarr as &$curl ) { 220 218 // Only call _wptexturize_pushpop_element if $curl is a delimeter. … … 245 243 246 244 // 9x9 (times), but never 0x9999 247 if ( $do_times_check) {245 if ( 1 === preg_match( '/(?<=\d)x-?\d/', $curl ) ) { 248 246 // Searching for a digit is 10 times more expensive than for the x, so we avoid doing this one! 249 247 $curl = preg_replace( '/\b(\d(?(?<=0)[\d\.,]+|[\d\.,]*))x(-?\d[\d\.,]*)\b/', '$1×$2', $curl );
Note: See TracChangeset
for help on using the changeset viewer.