diff --git a/src/workflow/ArcanistBrowseWorkflow.php b/src/workflow/ArcanistBrowseWorkflow.php --- a/src/workflow/ArcanistBrowseWorkflow.php +++ b/src/workflow/ArcanistBrowseWorkflow.php @@ -144,7 +144,13 @@ // If we fail, try to resolve them as paths. foreach ($things as $key => $path) { - $path = preg_replace('/:([0-9]+)$/', '$\1', $path); + $line = null; + $parts = explode(':', $path); + if (count($parts) > 1) { + $line = (int)array_pop($parts); + } + $path = implode(':', $parts); + $full_path = Filesystem::resolvePath($path); if (!$is_force && !Filesystem::pathExists($full_path)) { @@ -165,7 +171,13 @@ } $base_uri = $this->getBaseURI(); - $uris[] = $base_uri.$path; + $uri = $base_uri.$path; + + if ($line) { + $uri = $uri.'$'.$line; + } + + $uris[] = $uri; } } else { if ($things) {