-
Notifications
You must be signed in to change notification settings - Fork 465
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
Parser should catch error on duplicate keys in maps #628
Comments
I thought this had been addressed previously. My bad. Good catch.
I like the idea, but as far as Libsass is concerned Ruby sass is the "right way". Our goal is to act exactly as they do. If you want this feature in Libsass I would the suggestion on the Ruby sass repo. |
Right. Good idea, I will put up an issue on ruby-sass about it too. |
We can't currently test this case. See sass/sass-spec#136 |
Test for sass/libsass#628 Fixes sass#133
Test for sass/libsass#628 Fixes sass#133
Test for sass/libsass#628 Fixes sass#133
Still marked as "todo" due to libsass message mismatch. Test for sass/libsass#628 Fixes sass#133
Test for sass/libsass#628 Fixes sass#133
Test for sass/libsass#628 Fixes sass#133
So, ruby-sass throws an error when a map is declared that has any duplicate keys, including any at nested levels. i.e. maps that are values or keys within other maps:
Libsass currently does not run this check, and should; however, libsass can also do better than ruby-sass here. Note that ruby-sass fails to pick up duplicate-key maps that result from other operations. Example:
So imo libsass should have a map-validity check routine that runs on anything that involves SassScript maps or lists (as the latter may contain a map) as outputs or assignments.
The text was updated successfully, but these errors were encountered: