-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: fix link with angle brackets around href #1851
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/markedjs/markedjs/qhof6om3r |
|
||
href = href.trim(); | ||
if (href.startsWith('<')) { | ||
if (this.options.pedantic && !trimmedUrl.endsWith('>')) { |
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.
There are multiple (I think 3?) checks for the pedantic option. Is there some way all of the pedantic logic can be handled together?
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.
That would require duplicating a lot of the logic since most of the logic is the same.
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.
See my PR on your branch. Broke out my old boolean logic notes and reordered some things around. Not sure if it's "better", but it's more legible to me.
The lines |
I fixed |
🎉 This PR is included in version 1.2.6 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Marked version: v1.2.5
Description
Fixes CommonMark tests 486, 489, 490, 491
Contributor
Committer
In most cases, this should be a different person than the contributor.