Ticket #15556: 15556.patch
File 15556.patch, 1.4 KB (added by , 15 years ago) |
---|
-
formatting.php
40 40 $opening_quote = _x('“', 'opening curly quote'); 41 41 /* translators: closing curly quote */ 42 42 $closing_quote = _x('”', 'closing curly quote'); 43 /* translators: dash */ 44 $dash = _x('–', 'dash'); 43 45 44 46 $default_no_texturize_tags = array('pre', 'code', 'kbd', 'style', 'script', 'tt'); 45 47 $default_no_texturize_shortcodes = array('code'); … … 54 56 } 55 57 56 58 $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); 58 60 59 61 $dynamic_characters = array('/\'(\d\d(?:’|\')?s)/', '/\'(\d)/', '/(\s|\A|[([{<]|")\'/', '/(\d)"/', '/(\d)\'/', '/(\S)\'([^\'\s])/', '/(\s|\A|[([{<])"(?!\s)/', '/"(\s|\S|\Z)/', '/\'([\s.]|\Z)/', '/\b(\d+)x(\d+)\b/'); 60 62 $dynamic_replacements = array('’$1','’$1', '$1‘', '$1″', '$1′', '$1’$2', '$1' . $opening_quote . '$2', $closing_quote . '$1', '’$1', '$1×$2');