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

Fix amazon.com.br links not working #47

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

Conversation

marciogranzotto
Copy link

Amazon Brazil's link is amazon.com.br, but setting AMAZON_TLD=com.br doesn't work because it contains a . that needs to be escaped on regex, and the fullURLRegex didn't match the 3rd group (.com.br).

To fix it I:

  • added a regex escape function to build the amazon URL
  • changed the 3rd regex group for fullURLRegex to match from 1 to 2 times

@LucaTNT
Copy link
Owner

LucaTNT commented Dec 15, 2021

Thanks for the PR!

Just a question: shouldn't the regExpEscape() function be applied to the regexp in the definition of rawUrlRegex constant rather than to the buildAmazonUrl() function?

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.

None yet

2 participants