Support ISO 8601 in terminal link#278699
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR addresses issue #247568 by adding a negative lookbehind pattern to the terminal link parsing regex to prevent ISO 8601 timestamps from being incorrectly parsed as file paths with line/column numbers.
Key Changes
- Added a negative lookbehind regex pattern
(?<!\\d{4}-\\d{2}-\\d{2}T\\d{1,2}(?::\\d{1,2}){0,2}(?:[+-]\\d{2})?)to exclude ISO 8601 timestamps - Pattern prevents the link parser from matching timestamp components (like
:45in10:45) as line numbers - Addresses reported issues with zero trimming and deletion of
+characters in timestamps
src/vs/workbench/contrib/terminalContrib/links/browser/terminalLinkParsing.ts
Outdated
Show resolved
Hide resolved
src/vs/workbench/contrib/terminalContrib/links/browser/terminalLinkParsing.ts
Show resolved
Hide resolved
src/vs/workbench/contrib/terminalContrib/links/browser/terminalLinkParsing.ts
Outdated
Show resolved
Hide resolved
|
Looking a little closer so it's working find without the The fallback case where the quick pick shows up (search opener) isn't as important since if this is a file it should have been validated. |
|
Yeah, something is wrong with linkCandidates, even when link gets opened with None of links in pics worked🥲, even without the I thought the reason why the negative lookbehind or removing the pre-existing Lists in link candidates array seem odd because it would get picked up by Debugging (pre-PR) and After this PR atm with negative lookbehind I still get: but I'm able to open the links with Ideally I think they should be I should figure out why link candidate is wrong for both pre/post this this PR like suggested above, and maybe that would get us |
src/vs/workbench/contrib/terminalContrib/links/browser/terminalLocalLinkDetector.ts
Outdated
Show resolved
Hide resolved
1bb0508 to
15a9873
Compare

Resolves: #247568