When a hyphen `-` or double hyphen `--` was at the start or the end of a string, it wasn't texturized correctly.

Fixes #31030


Built from https://develop.svn.wordpress.org/trunk@31199


git-svn-id: http://core.svn.wordpress.org/trunk@31180 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Gary Pendergast 2015-01-16 03:54:24 +00:00
parent 798439c273
commit d0c327443c
2 changed files with 3 additions and 3 deletions

View File

@ -174,9 +174,9 @@ function wptexturize($text, $reset = false) {
// Dashes and spaces // Dashes and spaces
$dynamic[ '/---/' ] = $em_dash; $dynamic[ '/---/' ] = $em_dash;
$dynamic[ '/(?<=' . $spaces . ')--(?=' . $spaces . ')/' ] = $em_dash; $dynamic[ '/(?<=^|' . $spaces . ')--(?=$|' . $spaces . ')/' ] = $em_dash;
$dynamic[ '/(?<!xn)--/' ] = $en_dash; $dynamic[ '/(?<!xn)--/' ] = $en_dash;
$dynamic[ '/(?<=' . $spaces . ')-(?=' . $spaces . ')/' ] = $en_dash; $dynamic[ '/(?<=^|' . $spaces . ')-(?=$|' . $spaces . ')/' ] = $en_dash;
$dynamic_characters['dash'] = array_keys( $dynamic ); $dynamic_characters['dash'] = array_keys( $dynamic );
$dynamic_replacements['dash'] = array_values( $dynamic ); $dynamic_replacements['dash'] = array_values( $dynamic );

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.2-alpha-31197'; $wp_version = '4.2-alpha-31199';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.