// 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)) {
}
$base_uri = $this->getBaseURI();
- $uris[] = $base_uri.$path;
+ $uri = $base_uri.$path;
+
+ if ($line) {
+ $uri = $uri.'$'.$line;
+ }
+
+ $uris[] = $uri;
}
} else {
if ($things) {