Skip to content
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

URL Identifier Fixes #2477

Open
umairkhannn opened this issue Apr 22, 2024 · 1 comment
Open

URL Identifier Fixes #2477

umairkhannn opened this issue Apr 22, 2024 · 1 comment
Assignees

Comments

@umairkhannn
Copy link
Member

There are several places where URL identification and treatment are failing.

We should move away from the single regex for identification, and look to some pre-handlers that are more readable too, as the regex is a magical black box that is impossible to quickly understand and extend.

So:

Add handling first - to drop out of the function if there is an @ in the URL - this is likely an email address and can be left alone.

Split the string on # and ? and store those, adding them on to the pattern at the end so that we preserve and include the hash and the query string.

Update the regex itself to recognize one letter domains like x.com.

Image

@umairkhannn umairkhannn self-assigned this Apr 22, 2024
@f8daniel
Copy link
Member

boo

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants