Repository navigation
Read color keywords and function names regardless of case - #541
Merged
deeplook merged 1 commit intoNov 9, 2026
Merged
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.
fill="White"orstroke="RED"leaves the shape with no fill or stroke, with aCan't handle colorwarning:CSS keywords and function names are ASCII case-insensitive, and browsers draw this rect white.
convertColor()looked the name up withgetattr(colors, text), and ReportLab'scssParse()only accepts lowercase function names, soRGB(255, 0, 0)failed the same way. The same goes forcurrentcolorandNone.The keyword and function lookups now use the lowercased value. Hex colors were already case-insensitive, and
url(...)references are handled before this, so ids keep their case.Added
test_color_keywords_ignore_casenext to the other color tests; it fails on main. Added a### Fixedentry inCHANGELOG.md(I used #541 for the number, I'll fix it if the PR gets another one).pytest,ruff format --check,ruff checkandmypy src testspass.AI-assisted (Claude Code); I reviewed and tested the change