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

Misdetection of URLs / links in the "auto_huperlinks" example #141

Closed
fxcoudert opened this issue Sep 9, 2023 · 3 comments · Fixed by #250
Closed

Misdetection of URLs / links in the "auto_huperlinks" example #141

fxcoudert opened this issue Sep 9, 2023 · 3 comments · Fixed by #250
Labels
good first issue Good for newcomers

Comments

@fxcoudert
Copy link

The regexp in extract_url_byte_positions at https://github.com/MarshalX/atproto/blob/main/examples/advanced_usage/auto_hyperlinks.py does not appear to detect all valid URLs. Take for example:

https://www.cell.com/matter/fulltext/S2590-2385(23)00409-5?rss=yes

This is misdetected, and the URL is stopped before (

@MarshalX
Copy link
Owner

MarshalX commented Sep 9, 2023

Could you pls fix?

@fxcoudert
Copy link
Author

Not really. I've added \(\) to the allowed characters in my own use case, but I'm pretty sure the regexp is not conformant and will fail to catch other valid URLs. Probably better to use something designed and tested by someone else.

@MarshalX
Copy link
Owner

MarshalX commented Sep 9, 2023

@Jxck-S fyi

@MarshalX MarshalX added the good first issue Good for newcomers label Sep 16, 2023
@MarshalX MarshalX changed the title Misdetection of URLs / links Misdetection of URLs / links in the "auto_huperlinks" example Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants