Skip to content

Conversation

privatenumber
Copy link
Owner

@privatenumber privatenumber commented Aug 3, 2022

Problem

  • The regular expression was not bound to the start and end of the string, and therefore could match a subset
  • The regular expression had many unnecessary capture groups and syntax ({0,1} instead of ?) ((\/|:) instead of [\:])
  • .git should be escaped: \.git

Changes

Improved regular expression syntax by:

  • Adding start and end bounds so that it matches the full string
  • Removed unnecessary capture groups
  • Escaped .

@IonicaBizau the base branch is within my fork but would like to get this in upstream

@benjdlambert
Copy link

@privatenumber can you raise this PR with the upstream library? 🙏

@privatenumber
Copy link
Owner Author

It's already open: IonicaBizau#59

@benjdlambert
Copy link

Apologies - sorry got super confused 👍

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