Skip to content

Updated discord invite regex to match leading http/https/www #124

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

Merged
merged 9 commits into from
Aug 16, 2022

Conversation

ionite34
Copy link
Member

Closes #123

  • Added new optional groups to start of pattern
r"(https?://)?(www\.)?"
  • Added additional unit tests to confirm both re.match and re.search works as intended
  • Unified usage of flags keyword argument
  • Removed an existing redundant character class

- Added tests for both match and search, previously the fact that `re.match` did not work with http/https links was not made apparent by the tests as only `re.search` is tested.
@netlify
Copy link

netlify bot commented Aug 16, 2022

Deploy Preview for bot-core failed.

Name Link
🔨 Latest commit e96d063
🔍 Latest deploy log https://app.netlify.com/sites/bot-core/deploys/62fc2436b0e3970008597854

@ChrisLovering
Copy link
Member

Looks good, could you bump the version up by a minor version, and document the change in the change log.

There's some info about the change log in the docs readme

ionite34 and others added 2 commits August 16, 2022 19:11
Co-authored-by: ChrisJL <ChrisLovering@users.noreply.github.com>
@ChrisLovering ChrisLovering merged commit 009a139 into main Aug 16, 2022
@ChrisLovering ChrisLovering deleted the invite-regex branch August 16, 2022 23:16
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.

Discord invites with https:// prefix are considered invalid.
2 participants