`wptexturize()` should handle apostrophes before primes.
Props nacin, miqrogroove. Fixes #22823. Built from https://develop.svn.wordpress.org/trunk@28725 git-svn-id: http://core.svn.wordpress.org/trunk@28539 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
5755eaf372
commit
3d3c166f11
|
@ -118,6 +118,11 @@ function wptexturize($text) {
|
|||
$dynamic[ '/(?<=\A|[([{<"]|' . $spaces . ')\'/' ] = $opening_single_quote;
|
||||
}
|
||||
|
||||
// Apostrophe in a word. No spaces or double apostrophes.
|
||||
if ( "'" != $apos ) {
|
||||
$dynamic[ '/(?<!' . $spaces . ')\'(?!\Z|\'|' . $spaces . ')/' ] = $apos;
|
||||
}
|
||||
|
||||
// 9" (double prime)
|
||||
if ( '"' !== $double_prime ) {
|
||||
$dynamic[ '/(?<=\d)"/' ] = $double_prime;
|
||||
|
@ -128,11 +133,6 @@ function wptexturize($text) {
|
|||
$dynamic[ '/(?<=\d)\'/' ] = $prime;
|
||||
}
|
||||
|
||||
// Apostrophe in a word. No spaces or double primes.
|
||||
if ( "'" !== $apos ) {
|
||||
$dynamic[ '/(?<!' . $spaces . ')\'(?!\'|' . $spaces . ')/' ] = $apos;
|
||||
}
|
||||
|
||||
// Double quote at start, or preceded by (, {, <, [, or spaces, and not followed by spaces.
|
||||
if ( '"' !== $opening_quote ) {
|
||||
$dynamic[ '/(?<=\A|[([{<]|' . $spaces . ')"(?!' . $spaces . ')/' ] = $opening_quote;
|
||||
|
|
Loading…
Reference in New Issue