Change:
const fileNameEndIndex: number = index !== -1 ? index + fileName.length : link.length; // Sanitize the link text such that the folders and file name do not contain whitespace. <del> link = link.slice(0, fileNameEndIndex).replace(/s/g, '_') + link.slice(fileNameEndIndex); </del> <ins> let sanitizedLink = link.slice(0, fileNameEndIndex).replace(/s/g, '_') + link.slice(fileNameEndIndex); // Remove / suffixes from Windows paths such that the windows link regex works // (eg. /c:/file -> c:/file) if (this._os === OperatingSystem.Windows && sanitizedLink.match(/^/[a-z]://i)) { sanitizedLink = sanitizedLink.slice(1); } </ins> // The local link regex only works for non file:// links, check these for a simple // `:line:col` suffix <del> if (link.startsWith('file://')) { const simpleMatches = link.match(/:(d+)(:(d+))?$/); </del> <ins> if (sanitizedLink.startsWith('file://')) { const simpleMatches = sanitizedLink.match(/:(d+)(:(d+))?$/); </ins> if (simpleMatches) { if (simpleMatches[1] !== undefined) { lineColumnInfo.lineNumber = parseInt(simpleMatches[1]);

Discussion:
My project is under https://user- Reproduce steps: vscode open a folder which file path contains space, for example: an integrated terminal the path link Versions:
nice I can repro with the space in the name, thanks for following up
I can still repro with Windows.
I looked into this, and it will be tricky because we currently use space as one of the characters which indicates the end of a path. One idea would be to check if such a link exists (using our original regex) and if not, use regex on the subsequent sequence - then concatenating the two results for First result would be doesn't exist process exists
https://user- Look the above video, I have several questions. path is not a existed path in the disk, but also clickable. I click the , it open a file which is not why the whole string is recogonized to a path? the real path is:
this is actually about when the parents of the link have a space, it's expected currently that an absolute path with a space won't work.
is it expected that a local link with a space somewhere within the path is not detected? that is the case currently - verified via adding a test to
absolute paths (eg. ) won't work because of Relative paths without spaces with absolute ancestors that have spaces (eg. inside ) should work but don't in some cases.
When verifying, make sure to test both on a Windows machine and a non-Windows machine.
Doesn't work for me on a Mac, I guess thats probably because I still haven't got the fix in the latest insider build.
are you on ?
Worked for me on macOS. Don't have a Windows machine to try this out so someone else will need to verify on Windows.
Yes, I'm on that same version. Here's what it looks like for me on a Mac with spaces !
still not work in latest version: https://user-
For absolute paths, see I wasn't able to get to work, though. It'd open the file, but place the cursor at the beginning.
please provide some more details, it works for me: !
This is the behaviour with version 1.70.0 After ctrl+clik a popup appears at the top of the screen and I have to hit enter to go to the suggested file:line.
I can repro that on Windows, Remote-WSL and macOS.

The file must not be in the root directory for this to happen. !
let's track that problem in and as this issue is becoming quite unwieldy/unfocused.
created to track the problem related to quotes you're seeing. Could you re-verify this if all good outside of these 3 issues I created? It's difficult to manage this issue as it's so general.