Repository navigation
ipuz: carry shaded and highlighted squares - #619
Merged
Merged
Conversation
exportIpuz wrote circles only, so a puzzle's shade and highlight colors were lost from the .ipuz download. Shade is now written as style.highlight and a highlight color as style.color (six hex digits, no '#'). importIpuz reads them back, so an ipuz round trip keeps them.
Member
|
Looks good - thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The .ipuz download (
exportIpuz) writes circles but drops the other cell styles, so a puzzle's shaded squares and highlight colors are missing from the file. We found this archiving puzzles from Crosshare: a couple of themed puzzles came through with their shading gone, and the clues that pointed at it made no sense.This writes them with ipuz's own style keys:
shade→"highlight": true'#eb984e') →"color": "eb984e"(ipuz writes six hex digits with no#)importIpuzreads them back the same way, so an ipuz round trip keeps them. A color given as a palette number has no Crosshare equivalent and is skipped. ipuz has one color per cell; the builder sets one highlight at a time, so if a cell somehow has two, the first is written.Tests: a styled fixture in the ipuz round-trip cases, plus an import test and an export test.
🤖 Generated with Claude Code