Changeset 28776
- Timestamp:
- 06/19/2014 12:00:27 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/formatting.php
r28773 r28776 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 217 219 foreach ( $textarr as &$curl ) { 218 220 // Only call _wptexturize_pushpop_element if $curl is a delimeter. … … 243 245 244 246 // 9x9 (times), but never 0x9999 245 if ( 1 === preg_match( '/(?<=\d)x-?\d/', $text )) {247 if ( $do_times_check ) { 246 248 // Searching for a digit is 10 times more expensive than for the x, so we avoid doing this one! 247 249 $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.