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

go api: fix regexp escape missing wildcard characters - #26

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

benw10-1
Copy link

@benw10-1 benw10-1 commented Nov 2, 2024

Fix issue where regexp escape causes wildcards to be missed.
It happens in extreme-ish cases where the compressed deck string has more than 62 words and "regexp escaped" wildcards start to be used as tokens.

By replacing each token using string replacement we don't need to escape thus never run into this issue.

Tests in 686801e fail currently on master and pass on 5a9a705

Can generate further test-cases on mod commit 3933f95

See benw10-1/STR-Spire-Mod@3933f95 on the mod repo for generating deck strings from the mod output without needed to launch STS - includes case from running STS with the mod manually and getting the output directly from there
Fix issue where regexp escape causes wildcards to be missed.
It happens in extreme-ish cases where the compressed deck string has more than 62 words and "regexp escaped" wildcards start to be used as tokens.

By replacing each token using string replacement we don't need to escape thus never run into this issue.
@benw10-1 benw10-1 marked this pull request as ready for review November 2, 2024 19:55
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