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

Improve readability and cleanliness of clearURLs #2877

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

Conversation

CodeF53
Copy link
Contributor

@CodeF53 CodeF53 commented Sep 14, 2024

Today when I was stealing the url cleaning from clearURLs for one of my personal projects, I found the code kinda disgusting.

This commit primarily is just because of the unnecessarily complex code replacer used for removing bad params. Otherwise its just light edits to reduce unnecessary indents/lines.

This should hopefully make the code easier to steal for people in the future.

match => this.replacer(match)
);
}
if (msg.content.match(/http(s)?:\/\//)) return;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be inverted :)

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