Skip to content

Commit

Permalink
Merge pull request #200919 from sparxooo/200257-fix
Browse files Browse the repository at this point in the history
Fix for #200257 plus existing trailing non-numerics regex fix
  • Loading branch information
Tyriar authored Dec 15, 2023
2 parents 541e34d + 50d4858 commit a587752
Show file tree
Hide file tree
Showing 2 changed files with 472 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,14 @@ export class TerminalSearchLinkOpener implements ITerminalLinkOpener {
// - Grep output: <link>:<result line>
// This only happens when the colon is _not_ followed by a forward- or back-slash as that
// would break absolute Windows paths (eg. `C:/Users/...`).
text = text.replace(/:[^\\/][^\d]+$/, '');
text = text.replace(/:[^\\/\d][^\d]*$/, '');

// Remove any trailing periods after the line/column numbers, to prevent breaking the search feature, #200257
// Examples:
// "Check your code Test.tsx:12:45." -> Test.tsx:12:45
// "Check your code Test.tsx:12." -> Test.tsx:12

text = text.replace(/\.$/, '');

// If any of the names of the folders in the workspace matches
// a prefix of the link, remove that prefix and continue
Expand Down
Loading

0 comments on commit a587752

Please sign in to comment.