diff --git a/src/infrastructure/util/PhabricatorSlug.php b/src/infrastructure/util/PhabricatorSlug.php index a6cf0bc70c..fd169914fe 100644 --- a/src/infrastructure/util/PhabricatorSlug.php +++ b/src/infrastructure/util/PhabricatorSlug.php @@ -42,13 +42,6 @@ final class PhabricatorSlug extends Phobject { $parts = explode('/', $slug); - // Convert "_-_" into "-". This is a little nicer for inputs with - // hyphens used as internal separators, and turns an input like "A - B" - // into "a-b" instead of "a_-_b"; - foreach ($parts as $key => $part) { - $parts[$key] = str_replace('_-_', '-', $part); - } - // Remove leading and trailing underscores from each component, if the // component has not been reduced to a single underscore. For example, "a?" // converts to "a", but "??" converts to "_". diff --git a/src/infrastructure/util/__tests__/PhabricatorSlugTestCase.php b/src/infrastructure/util/__tests__/PhabricatorSlugTestCase.php index e493ab7363..6a801bb54c 100644 --- a/src/infrastructure/util/__tests__/PhabricatorSlugTestCase.php +++ b/src/infrastructure/util/__tests__/PhabricatorSlugTestCase.php @@ -34,7 +34,7 @@ final class PhabricatorSlugTestCase extends PhabricatorTestCase { 'a/??/c' => 'a/_/c/', 'a/?b/c' => 'a/b/c/', 'a/b?/c' => 'a/b/c/', - 'a - b' => 'a-b/', + 'a - b' => 'a_-_b/', 'a[b]' => 'a_b/', 'ab!' => 'ab!/', ); @@ -51,7 +51,7 @@ final class PhabricatorSlugTestCase extends PhabricatorTestCase { $slugs = array( 'a:b' => 'a_b', 'a!b' => 'a_b', - 'a - b' => 'a-b', + 'a - b' => 'a_-_b', '' => '', 'Demonology: HSA (Hexes, Signs, Alchemy)' => 'demonology_hsa_hexes_signs_alchemy',