fix(svg.go): don't drop explicit colors when settings a foregroundColorOverride#19
Open
danshick wants to merge 1 commit intoMrMarble:v0-oldfrom
Open
fix(svg.go): don't drop explicit colors when settings a foregroundColorOverride#19danshick wants to merge 1 commit intoMrMarble:v0-oldfrom
danshick wants to merge 1 commit intoMrMarble:v0-oldfrom
Conversation
Author
|
looks like i broke a few tests by deviating from the golden fixture. will get that fixed and update. |
5b37ea2 to
8e8a1a2
Compare
Author
|
ok, tests are passing for me now. |
…orOverride this change keeps all custom color classes in place when setting a foregroundColorOverride and chooses instead to style all vt10x.DefaultFG colored text uniformly using a text element selector. the DefaultFG color is set to the result of GetColor(vt10x.DefaultFG) which gives ANSI color LightGrey. this is the same as the previous implicit behavior regardless of whether or not that was intended. if a foregroundColorOverride is set, that color is used instead. this better matches the behavior of the backgroundColorOverride which still respects explicit CSI SGR signals while changing the DefaultBG where it is encountered.
8e8a1a2 to
21ff277
Compare
Author
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.
this change keeps all custom color classes in place when setting a foregroundColorOverride and chooses instead to style all vt10x.DefaultFG colored text uniformly using a text element selector. the DefaultFG color is set to the result of GetColor(vt10x.DefaultFG) which gives ANSI color LightGrey. this is the same as the previous implicit behavior regardless of whether or not that was intended. if a foregroundColorOverride is set, that color is used instead. this better matches the behavior of the backgroundColorOverride which still respects explicit CSI SGR signals while changing the DefaultBG where it is encountered.