WordPress.org

Make WordPress Core

Ticket #15556: 15556.patch

File 15556.patch, 1.4 KB (added by SergeyBiryukov, 4 years ago)
  • formatting.php

     
    4040                $opening_quote = _x('“', 'opening curly quote'); 
    4141                /* translators: closing curly quote */ 
    4242                $closing_quote = _x('”', 'closing curly quote'); 
     43                /* translators: dash */ 
     44                $dash = _x('–', 'dash'); 
    4345 
    4446                $default_no_texturize_tags = array('pre', 'code', 'kbd', 'style', 'script', 'tt'); 
    4547                $default_no_texturize_shortcodes = array('code'); 
     
    5456                } 
    5557 
    5658                $static_characters = array_merge(array('---', ' -- ', '--', ' - ', 'xn–', '...', '``', '\'\'', ' (tm)'), $cockney); 
    57                 $static_replacements = array_merge(array('—', ' — ', '–', ' – ', 'xn--', '…', $opening_quote, $closing_quote, ' ™'), $cockneyreplace); 
     59                $static_replacements = array_merge(array('—', ' — ', $dash, ' ' . $dash . ' ', 'xn--', '…', $opening_quote, $closing_quote, ' ™'), $cockneyreplace); 
    5860 
    5961                $dynamic_characters = array('/\'(\d\d(?:&#8217;|\')?s)/', '/\'(\d)/', '/(\s|\A|[([{<]|")\'/', '/(\d)"/', '/(\d)\'/', '/(\S)\'([^\'\s])/', '/(\s|\A|[([{<])"(?!\s)/', '/"(\s|\S|\Z)/', '/\'([\s.]|\Z)/', '/\b(\d+)x(\d+)\b/'); 
    6062                $dynamic_replacements = array('&#8217;$1','&#8217;$1', '$1&#8216;', '$1&#8243;', '$1&#8242;', '$1&#8217;$2', '$1' . $opening_quote . '$2', $closing_quote . '$1', '&#8217;$1', '$1&#215;$2');