-
Notifications
You must be signed in to change notification settings - Fork 141
Fix #584 text-shadow with multiple values #1019
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@jwang1919 so I think we might be at a point where we should just contribute a fix upstream to I would lean in that direction because PrettyCSS itself has a full tokenizer and lexer built in, so adding support for a given syntactic construct is much more robust and expressive than trying to work around a parser error using regular expressions. (I admit to being a little lost looking at the regexps you introduce here, and I consider myself reasonably competent with regexps). WDYT? |
|
@outoftime Yeah that sounds like a better option to me as well. The regexp was a difficult come up with, but not too hard to interpret. |
|
@jwang1919 gotcha. yeah I’ve only worked with lookaheads a couple times, that’s what threw me off. FWIW, we don’t necessarily need to wait for PrettyCSS to integrate your patch—we could temporarily target https://github.com/popcodeorg/PrettyCSS (which I think I did in the past while waiting for PRs to get merged) |
|
Okay, made the changes and submitted PRs to both the original branch and the popcode fork. Once those are dealt with, I can change this branch's code. |
d7ef859 to
75e4f2a
Compare
75e4f2a to
d1c0731
Compare
|
@outoftime When possible, please review again. I have pushed the fix onto the PrettyCSS library (the maintainer merged it pretty quickly) and I've updated the PrettyCSS library. |
outoftime
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sick!! Awesome work on the upstream PR!
Fixes bug #584
Gave commas between CSS parenthesis statements like
rgbaleeway in the PrettyCSS validation.I found that doing so inadvertently created another bug where multiple commas would flag as valid. I added another check to deal with this as well as added the requisite validations in the test case.