Repository navigation
Expand CSS shorthand hex colors before ANSI conversion - #92
Open
ShahadatTest wants to merge 1 commit into
Open
ShahadatTest wants to merge 1 commit into
ShahadatTest wants to merge 1 commit into
Conversation
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.
Three-digit CSS hex colors duplicate each digit: #fff is #ffffff. HTMLConverter currently parses each digit directly, giving (15, 15, 15) instead of (255, 255, 255), so shorthand and full notation render different colors. Expand each component before converting it.
The new regression fails before the change. It checks white, mixed-case and numeric colors, and compares foreground/background ANSI output with the equivalent six-digit notation. Python 3.12: both the new test and existing HTML conversion test pass. The same 3 parser checks and 6 foreground/background comparisons pass on Python 3.10. Flake8 and diff checks pass.
Full Python 3.12 unittest run: 70 tests, with the same 1 failure and 5 errors as pristine master (69 tests). These affect the existing HOME-dependent path checks, terminal/CLI capture and MockedProgram tests on this Windows environment. The affected HTML tests pass; a clean full suite or historical Python 2.7-3.9 matrix is not claimed.
Prepared with OpenAI Codex (GPT-6) assistance for
new 10ta koro(make 10 new contributions). No human code review or personal production usage is claimed.