mirror of
git://develop.git.wordpress.org/
synced 2025-01-19 13:47:02 +01:00
Texturize fix.
git-svn-id: https://develop.svn.wordpress.org/trunk@1592 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
da530a13ae
commit
1173ae6867
@ -12,8 +12,9 @@ function wptexturize($text) {
|
||||
|
||||
if (isset($curl{0}) && '<' != $curl{0} && $next) { // If it's not a tag
|
||||
$curl = str_replace('---', '—', $curl);
|
||||
$curl = preg_replace('/(\s)--(\s)/', '$1—$2', $curl);
|
||||
$curl = str_replace('--', '–', $curl);
|
||||
$curl = str_replace("...", '…', $curl);
|
||||
$curl = str_replace('...', '…', $curl);
|
||||
$curl = str_replace('``', '“', $curl);
|
||||
|
||||
// This is a hack, look at this more later. It works pretty well though.
|
||||
@ -28,11 +29,11 @@ function wptexturize($text) {
|
||||
$curl = preg_replace("/(\d+)'/", '$1′', $curl);
|
||||
$curl = preg_replace("/(\S)'([^'\s])/", "$1’$2", $curl);
|
||||
$curl = preg_replace('/(\s|\A)"(?!\s)/', '$1“$2', $curl);
|
||||
$curl = preg_replace('/"(\s|\Z)/', '”$1', $curl);
|
||||
$curl = preg_replace('/"(\s|\S|\Z)/', '”$1', $curl);
|
||||
$curl = preg_replace("/'([\s.]|\Z)/", '’$1', $curl);
|
||||
$curl = preg_replace("/\(tm\)/i", '™', $curl);
|
||||
$curl = preg_replace("/\(c\)/i", '©', $curl);
|
||||
$curl = preg_replace("/\(r\)/i", '®', $curl);
|
||||
$curl = preg_replace("/ \(tm\)/i", ' ™', $curl);
|
||||
$curl = preg_replace("/ \(c\)/i", ' ©', $curl);
|
||||
$curl = preg_replace("/ \(r\)/i", ' ®', $curl);
|
||||
$curl = str_replace("''", '”', $curl);
|
||||
|
||||
$curl = preg_replace('/(d+)x(\d+)/', "$1×$2", $curl);
|
||||
|
Loading…
x
Reference in New Issue
Block a user