-
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
Incorrect parsing of consecutive quoted strings, unquoted strings and interpolations. #1413
Comments
@andrew-skybound I'm having trouble following your issue. Please produce copy-pastable code that show the difference between Ruby Sass and LibSass so we can plainly see the difference and debug it. |
Input:
Ruby SASS Output:
Libsass Output:
|
mgreter
added a commit
to mgreter/sass-spec
that referenced
this issue
Aug 24, 2015
mgreter
added a commit
to mgreter/sass-spec
that referenced
this issue
Aug 24, 2015
@mgreter which PR addresses this? |
I guess #1475 |
Confirmed #1475 fixes this. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When no space is present between consecutive quoted strings, unquoted strings and interpolations, Libsass doesn't parse the sequence the same as Ruby sass does.
From what I can tell, Ruby always generates a single string when the sequence contains an interpolation, and makes a list otherwise. However, it inserts spaces into the generated string BETWEEN each quoted and unquoted string.
Here are some examples to clear things up. Note that I've used single quotes in the input, which Ruby always converts to double quotes in the output, but Libsass does not in some cases. Maybe this should be a separate issue, I'm not sure.
Test 1 (sequences with ONLY strings or ONLY interpolation):
Test 1 Output (Libsass and Ruby are identical here, including quotes):
type-of()
for the first 4 declarations above is "list";type-of()
for the second 4 is "string".Test 2 (sequences with both strings and interpolation):
Test 2 Output (Ruby):
Note that
type-of()
for all declarations above returns "string" in Ruby. So the spaces would appear to be spaces in a single unquoted string.Test 2 Output (Libsass):
The text was updated successfully, but these errors were encountered: