Page MenuHomePhabricator

D14287.id34485.diff
No OneTemporary

D14287.id34485.diff

diff --git a/src/infrastructure/util/PhabricatorSlug.php b/src/infrastructure/util/PhabricatorSlug.php
--- a/src/infrastructure/util/PhabricatorSlug.php
+++ b/src/infrastructure/util/PhabricatorSlug.php
@@ -42,13 +42,6 @@
$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
--- a/src/infrastructure/util/__tests__/PhabricatorSlugTestCase.php
+++ b/src/infrastructure/util/__tests__/PhabricatorSlugTestCase.php
@@ -34,7 +34,7 @@
'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 @@
$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',

File Metadata

Mime Type
text/plain
Expires
Oct 18 2024, 11:37 AM (4 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6726662
Default Alt Text
D14287.id34485.diff (1 KB)

Event Timeline