Texturize kung-foo

git-svn-id: http://svn.automattic.com/wordpress/trunk@985 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
saxmatt 2004-03-22 01:34:32 +00:00
parent adbca5d4fc
commit b4a43ce64d
1 changed files with 5 additions and 5 deletions

View File

@ -18,14 +18,14 @@ function wptexturize($text) {
$cockneyreplace = array("’tain’t","’twere","’twas","’tis","’twill","’til","’bout","’nuff","’round"); $cockneyreplace = array("’tain’t","’twere","’twas","’tis","’twill","’til","’bout","’nuff","’round");
$curl = str_replace($cockney, $cockneyreplace, $curl); $curl = str_replace($cockney, $cockneyreplace, $curl);
$curl = preg_replace("/'s/", "’s", $curl); $curl = preg_replace("/'s/", '’s', $curl);
$curl = preg_replace("/'(\d\d(?:’|')?s)/", "’$1", $curl); $curl = preg_replace("/'(\d\d(?:’|')?s)/", "’$1", $curl);
$curl = preg_replace('/(\s|\A|")\'/', '$1‘', $curl); $curl = preg_replace('/(\s|\A|")\'/', '$1‘', $curl);
$curl = preg_replace("/(\d+)\"/", "$1″", $curl); $curl = preg_replace('/(\d+)"/', '$1″', $curl);
$curl = preg_replace("/(\d+)'/", "$1′", $curl); $curl = preg_replace("/(\d+)'/", '$1′', $curl);
$curl = preg_replace("/(\S)'([^'\s])/", "$1’$2", $curl); $curl = preg_replace("/(\S)'([^'\s])/", "$1’$2", $curl);
$curl = preg_replace('/"([\s.,!?;:&\']|\Z)/', '”$1', $curl); $curl = preg_replace('/(\s|\A)"(?!\s)/', '$1“$2', $curl);
$curl = preg_replace('/(\s|\A)"/', '$1“', $curl); $curl = preg_replace('/"(\s|\Z)/', '”$1', $curl);
$curl = preg_replace("/'([\s.]|\Z)/", '’$1', $curl); $curl = preg_replace("/'([\s.]|\Z)/", '’$1', $curl);
$curl = preg_replace("/\(tm\)/i", '™', $curl); $curl = preg_replace("/\(tm\)/i", '™', $curl);
$curl = preg_replace("/\(c\)/i", '©', $curl); $curl = preg_replace("/\(c\)/i", '©', $curl);