Skip to content

Comments

Fix leveler regex failure cases#98

Open
Gavin-Bowers wants to merge 2 commits intoInvestigamer:mainfrom
Gavin-Bowers:leveler-fix
Open

Fix leveler regex failure cases#98
Gavin-Bowers wants to merge 2 commits intoInvestigamer:mainfrom
Gavin-Bowers:leveler-fix

Conversation

@Gavin-Bowers
Copy link

Leveler regex pattern would fail to match or have incorrect groups on cards with empty level abilities (Lighthouse Chronologist) and cards with newlines in level abilities (Kargan Dragonlord). This fix replaces the pattern with one that handles these cases. In the case of an empty ability, the group now contains an empty string. The leveler template will still need to be changed for the placeholder text not to show up on cards with empty level abilities.

@Gavin-Bowers
Copy link
Author

Gavin-Bowers commented Feb 26, 2025

I fixed the regex pattern since I accidentally committed an unfinished version originally. I also added a fix for rendering cards with empty abilities, by making middle_text return a space instead of an empty string when the regex group is empty. I tested it this time to make sure the changes work

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.

1 participant