From d0c327443c9ecf90abf057d1f57648c1a92b042b Mon Sep 17 00:00:00 2001 From: Gary Pendergast Date: Fri, 16 Jan 2015 03:54:24 +0000 Subject: [PATCH] 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 --- wp-includes/formatting.php | 4 ++-- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index f8d1e74264..2bfb1376b6 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -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[ '/(?