fix(convert): recover table cell background colors on export/read - #110
Merged
Conversation
storage_to_md.go never read data-highlight-colour, so a page's cell background colors were silently dropped on export/read even though MdToConfluence fully supports writing them from a bg: marker. Verified live against MIR/1891074056 (60 colored cells, 0 recovered). Fixes #109.
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.
Summary
storage_to_md.gonever readdata-highlight-colour, so a page's table cell background colors were silently dropped onexport/readeven thoughMdToConfluencefully supports writing them from abg:marker.bg:markers; after, all 60 round-trip correctly, including swatch-name normalization and the gray/grey hex collision.Fix
cellBGNames, the reverse oftables.go's swatch map (hex → name, British spelling wins where a hex has two names).cellBGMarkerCommentinstorage_to_md.go, used bycellTextsto re-emit<!-- bg:NAME -->for any cell carryingdata-highlight-colour(falling back to the literal hex for a color outside the 21-swatch vocabulary).CLAUDE.md's architecture notes to describe the reverse mapping.Fixes #109.
Test plan
TestRoundTripTableCellBG(swatch-name recovery, hex→name normalization, gray/grey collision)make checkpasses (vet, fmt-check, test, build, lint)exportagainst the live page that originally exposed the bug and confirmed colors now round-trip