-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Parsing Error "Unrecognised input" for color operations with color names #2124 #2775
Conversation
…tions with color names.
Linking original issue: #2124 |
Btw., would not it make sense to add more tests for ambiguous (especially with foo {
0: 0 -red;
1: 1 - red;
2: -red * 2;
@3: -red;
&-bar@{3} {x: y}
} |
I was confident, but |
It's just also similar quite not always predictable story with hex values, for example. So I'm just a bit concerned of more side-effects this could add. Technically for Thus I probably would left P.S. e.g. just like |
Since |
Never mind, identifier multiplied by number fails no matter what, so it is better to keep it that way. If it wants to be changed, it would be different issue anyway. So I will just add test you suggested without that. |
Yep. |
Parsing Error "Unrecognised input" for color operations with color names #2124
namedColor: function () { | ||
parserInput.save(); | ||
var autoCommentAbsorb = parserInput.autoCommentAbsorb; | ||
parserInput.autoCommentAbsorb = false; |
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.
Investigating #2802. Indeed that's mysterious. W/o autoCommentAbsorb = false;
this property: yes /* comment */;
causes infinite parser loop (why?),
but otherwise property: red /* comment */;
is obviously expected to fail.
No ideas how to fix this so far.
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.
Never mind, I found another workaround on top of that. Now just polishing a performance for the fix.
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.
I added parserInput.autoCommentAbsorb = false
because the comments were either doubled or swallowed without it (I do not remember which one).
Named colors inside expressions are will be parsed as colors.