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

Remove duplicate spaces in the calc description #570

Merged
merged 2 commits into from
Oct 6, 2023
Merged

Remove duplicate spaces in the calc description #570

merged 2 commits into from
Oct 6, 2023

Conversation

shrianshChari
Copy link
Contributor

https://www.smogon.com/forums/threads/pok%C3%A9mon-showdown-damage-calculator.3593546/post-9724268

Before (first line) vs after (second line) with double spaces highlighted.
image

@AnnikaCodes
Copy link
Collaborator

Shouldn't we be avoiding the double spaces in the first place rather than using a regex to remove them afterwards?

@shrianshChari
Copy link
Contributor Author

That's probably a better solution, but I didn't want to touch as much of the existing code when I did this commit. I can look at it again and figure out something that would avoid double spaces while constructing the calc description.

@shrianshChari
Copy link
Contributor Author

Found that the issue behind the double space problem was that the descriptors for the Flower Gift boosts, Battery boosts, Power Spot boosts, and the switch boost (for Pursuit) had spaces on either side of the message when it should have only been on one side. This is now standardized with the other descriptors, and a test has been written for this.

@thejetou thejetou merged commit 784a65a into smogon:master Oct 6, 2023
2 checks passed
@thejetou
Copy link
Collaborator

thejetou commented Oct 6, 2023

Thanks!

@shrianshChari shrianshChari deleted the duplicate-spaces branch October 6, 2023 13:55
ForwardFeed pushed a commit to ForwardFeed/damage-calc that referenced this pull request Oct 28, 2023
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.

4 participants