- Notifications
You must be signed in to change notification settings - Fork33.8k
Remove angle brackets when checking the scheme#133419
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This only removes the brackets during the scheme check if the initial link provided actually has angle brackets.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Thanks for taking a look. Just a few minor points of feedback
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Change to use replace instead of match for easier reading
@mjbvz I made those changes you suggested, and thank you for reviewing the PR. Let me know of any further changes you may think of. |
Thanks! |
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 PRfixes#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).