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

Validate hex colors in FromJSON instance #2237

Merged
merged 5 commits into from
Dec 27, 2024
Merged

Validate hex colors in FromJSON instance #2237

merged 5 commits into from
Dec 27, 2024

Conversation

byorgey
Copy link
Member

@byorgey byorgey commented Dec 27, 2024

Fixes #2236. Stores Kolor instead of Text inside a HexColor, and validates and parses it when reading from JSON. This simplifies the code in multiple places where we were taking the Text out of a HexColor and parsing it.

Copy link
Member

@kostmo kostmo left a comment

Choose a reason for hiding this comment

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

Nice improvement.

src/swarm-scenario/Swarm/Game/Scenario/Style.hs Outdated Show resolved Hide resolved
@byorgey byorgey added the merge me Trigger the merge process of the Pull request. label Dec 27, 2024
@mergify mergify bot merged commit 20fd908 into main Dec 27, 2024
14 checks passed
@mergify mergify bot deleted the fix/issue-2236 branch December 27, 2024 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge me Trigger the merge process of the Pull request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unparseable custom attribute colors cause a crash
2 participants