Summary: Ref T5971. We lose validation of the line ranges, but I don't think that's a huge issue.
Test Plan: Ran `arc browse README`, `arc browse README:3`, and `arc browse README:3,6-7`
Reviewers: btrahan, epriestley, #blessed_reviewers
Reviewed By: epriestley, #blessed_reviewers
Subscribers: epriestley, Korvin
Maniphest Tasks: T5971
Differential Revision: https://secure.phabricator.com/D10352
// If we fail, try to resolve them as paths.
foreach ($things as $key => $path) {
- $line = null;
+ $lines = null;
$parts = explode(':', $path);
if (count($parts) > 1) {
- $line = (int)array_pop($parts);
+ $lines = array_pop($parts);
}
$path = implode(':', $parts);
$base_uri = $this->getBaseURI();
$uri = $base_uri.$path;
- if ($line) {
- $uri = $uri.'$'.$line;
+ if ($lines) {
+ $uri = $uri.'$'.$lines;
}
$uris[] = $uri;