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

Parse URLs after sentence dot correctly #3142

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tpaulshippy
Copy link

This is simply a copy of #913 merged into the current main branch.
All credit should go to the author (@KevSlashNull) and the approver (@dholms).

I noticed that this one is:
A. Still a bug.
B. The oldest non-draft PR (1.5 years old).
C. Already approved.
D. Needing a merge.

Can we get it merged in?


Original PR description

This fixes the parsing of URLs that are prefixed by a dot (.), i.e. when the user forgot a space between the end of a sentence and a link.

I noticed the problem in this post where the link should be clickable.

image

The fix is done by preventing the second alternative capture group from having a domain end in .https:// (which would be an invalid domain anyway), since that would capture out.https in the example message Check this out.https://afterdot.com.

@KevSlashNull
Copy link
Contributor

thanks @tpaulshippy for trying to push this again!

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

Successfully merging this pull request may close these issues.

2 participants