mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
When a hyphen - or double hyphen -- was at the start or the end of a string, it wasn't texturized correctly.
Fixes #31030 git-svn-id: https://develop.svn.wordpress.org/trunk@31199 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -174,9 +174,9 @@ function wptexturize($text, $reset = false) {
|
||||
|
||||
// Dashes and spaces
|
||||
$dynamic[ '/---/' ] = $em_dash;
|
||||
$dynamic[ '/(?<=' . $spaces . ')--(?=' . $spaces . ')/' ] = $em_dash;
|
||||
$dynamic[ '/(?<=^|' . $spaces . ')--(?=$|' . $spaces . ')/' ] = $em_dash;
|
||||
$dynamic[ '/(?<!xn)--/' ] = $en_dash;
|
||||
$dynamic[ '/(?<=' . $spaces . ')-(?=' . $spaces . ')/' ] = $en_dash;
|
||||
$dynamic[ '/(?<=^|' . $spaces . ')-(?=$|' . $spaces . ')/' ] = $en_dash;
|
||||
|
||||
$dynamic_characters['dash'] = array_keys( $dynamic );
|
||||
$dynamic_replacements['dash'] = array_values( $dynamic );
|
||||
|
||||
Reference in New Issue
Block a user