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

[AntiLinks] Match URLs Like x.com #41

Merged
merged 1 commit into from
Jan 3, 2024
Merged

Conversation

mario31274
Copy link
Contributor

The original regex wouldn't match URLs that only have one character before .xxx, such as x.com. I simply add a ? after [\d\w] to make the regex accept domain names started with a single character.

Since Twitter registered x.com as its alternative domain name, many people would use links starting with x.com, and AntiLinks would fail to remove such links (Thanks, Elon!)

Not sure if this change would break other URL matching, but I tested with some other links without encountering any problems.

@japandotorg japandotorg self-assigned this Nov 29, 2023
@japandotorg japandotorg added the enhancement New feature or request label Nov 29, 2023
@japandotorg
Copy link
Owner

LGTM!

Thanks for the PR!

@japandotorg japandotorg changed the title Match URLs Like x.com [AntiLinks] Match URLs Like x.com Jan 3, 2024
@japandotorg japandotorg merged commit 5b4b5c3 into japandotorg:main Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants