Page MenuHomePhabricator

D10346.diff
No OneTemporary

D10346.diff

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) {

File Metadata

Mime Type
text/plain
Expires
Mon, Mar 10, 5:21 AM (3 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7312326
Default Alt Text
D10346.diff (967 B)

Event Timeline