-
Notifications
You must be signed in to change notification settings - Fork 306
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: some invalid url wrongly detected by anchorme #3186
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
auto-assign
bot
requested review from
guanbinrui,
Jack-Works,
jk234ert,
septs and
zhouhanseng
May 16, 2021 03:39
url like `https://…a.com`. see alexcorvi/anchorme.js/issues/109 closes #3185
UncleBill
force-pushed
the
fix/url-parsing
branch
from
May 16, 2021 03:46
9ba3efe
to
f781141
Compare
septs
reviewed
May 16, 2021
Comment on lines
6
to
13
.filter((y) => { | ||
try { | ||
new URL(y) | ||
return true | ||
} catch { | ||
return false | ||
} | ||
}) |
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.
plz extract this snippet as function, .filter(isValidURL)
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.
I think we're ok with this as a temporary fix
Jack-Works
reviewed
May 16, 2021
Co-authored-by: Jack Works <[email protected]>
Jack-Works
approved these changes
May 16, 2021
guanbinrui
approved these changes
May 17, 2021
guanbinrui
pushed a commit
that referenced
this pull request
May 17, 2021
* fix: some invalid url wrongly detected by anchorme url like `https://…a.com`. see alexcorvi/anchorme.js/issues/109 closes #3185 * Update packages/shared/src/utils/parseURL.ts Co-authored-by: Jack Works <[email protected]> Co-authored-by: Jack Works <[email protected]>
guanbinrui
pushed a commit
that referenced
this pull request
May 19, 2021
* fix: some invalid url wrongly detected by anchorme url like `https://…a.com`. see alexcorvi/anchorme.js/issues/109 closes #3185 * Update packages/shared/src/utils/parseURL.ts Co-authored-by: Jack Works <[email protected]> Co-authored-by: Jack Works <[email protected]>
guanbinrui
pushed a commit
that referenced
this pull request
May 19, 2021
* fix: some invalid url wrongly detected by anchorme url like `https://…a.com`. see alexcorvi/anchorme.js/issues/109 closes #3185 * Update packages/shared/src/utils/parseURL.ts Co-authored-by: Jack Works <[email protected]> Co-authored-by: Jack Works <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
url like
https://…a.com
. see alexcorvi/anchorme.js/issues/109closes #3185