Make WordPress Core

Changeset 28802


Ignore:
Timestamp:
06/22/2014 10:12:47 PM (10 years ago)
Author:
SergeyBiryukov
Message:

Revert [28776] and use a correct variable instead.

props miqrogroove.
fixes #28575.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/formatting.php

    r28776 r28802  
    215215    $textarr = preg_split( $regex, $text, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY );
    216216
    217     $do_times_check = ( 1 === preg_match( '/(?<=\d)x-?\d/', $text ) );
    218 
    219217    foreach ( $textarr as &$curl ) {
    220218        // Only call _wptexturize_pushpop_element if $curl is a delimeter.
     
    245243
    246244            // 9x9 (times), but never 0x9999
    247             if ( $do_times_check ) {
     245            if ( 1 === preg_match( '/(?<=\d)x-?\d/', $curl ) ) {
    248246                // Searching for a digit is 10 times more expensive than for the x, so we avoid doing this one!
    249247                $curl = preg_replace( '/\b(\d(?(?<=0)[\d\.,]+|[\d\.,]*))x(-?\d[\d\.,]*)\b/', '$1&#215;$2', $curl );
Note: See TracChangeset for help on using the changeset viewer.