WordPress.org

Make WordPress Core

Ticket #8775: number_curly_quotes.diff

File number_curly_quotes.diff, 1.3 KB (added by filosofo, 6 years ago)
  • wp-includes/formatting.php

     
    4747        $static_characters = array_merge(array('---', ' -- ', '--', 'xn–', '...', '``', '\'s', '\'\'', ' (tm)'), $cockney); 
    4848        $static_replacements = array_merge(array('—', ' — ', '–', 'xn--', '…', '“', '’s', '”', ' ™'), $cockneyreplace); 
    4949 
    50         $dynamic_characters = array('/\'(\d\d(?:’|\')?s)/', '/(\s|\A|")\'/', '/(\d+)"/', '/(\d+)\'/', '/(\S)\'([^\'\s])/', '/(\s|\A)"(?!\s)/', '/"(\s|\S|\Z)/', '/\'([\s.]|\Z)/', '/(\d+)x(\d+)/'); 
    51         $dynamic_replacements = array('’$1','$1‘', '$1″', '$1′', '$1’$2', '$1“$2', '”$1', '’$1', '$1×$2'); 
     50        $dynamic_characters = array('/\'(\d\d(?:’|\')?s)/', '/(\s|\A|")\'/', '/"(\d+)"/', '/(\d+)"/', '/(‘\d+)\'/', '/(\d+)\'/', '/(\S)\'([^\'\s])/', '/(\s|\A)"(?!\s)/', '/"(\s|\S|\Z)/', '/\'([\s.]|\Z)/', '/(\d+)x(\d+)/'); 
     51        $dynamic_replacements = array('’$1','$1‘', '“$1”', '$1″', '$1’', '$1′', '$1’$2', '$1“$2', '”$1', '’$1', '$1×$2'); 
    5252 
    5353        for ( $i = 0; $i < $stop; $i++ ) { 
    5454                $curl = $textarr[$i];