Remove angle brackets when checking the scheme #133419
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
When the link is being checked for a known scheme in a markdown file, the scheme wasn't being recognized when encased inside of angle brackets < and >. This change strips the link of beginning and ending < and > so the scheme can be properly checked.
This only removes the brackets during the scheme check if the initial link provided actually has angle brackets. Otherwise it will just use the given link as usual.
Issue
This PR fixes #132974
Testing (Currently Released Build)
Begin editing a markdown file, and enter the following text into the file. If you attempt to
command + click
orcontrol + click
the link in the markdown file you are editing, it won't open in a browser. (note it will open from the markdown preview, just not the editable markdown file)Testing (Fixes)
With the code changes applied, you can enter the same text in a markdown file, and the link will open up as expected in the browser. (and it will still open from the markdown preview).