-
Notifications
You must be signed in to change notification settings - Fork 464
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Permit multiline in URL #1096
Comments
Specs added sass/sass-spec#345 |
@mgreter, there is still one crazy case which is inconsistent (perhaps not worth fixing?). (added periods to highlight spaces) @import url("a.. .\.. .
. . b"); Ruby Sass: @import url("a.. ... .\a . . b"); Current libsass master (28ee088): @import url("a.. ... .
\a . . b"); Not sure about logic behind ruby-sass implementation. I was expecting something like this: @import url("a.. ... .\ . . b"); |
This still fails the spec. |
Apologies, it looks like my local sass-spec is having issues. |
This fix was a false positive due to sass/sass-spec#380. The spec still fails. |
This is a continuation of the previous work done to bring our `url()` parsing up to scratch with Ruby Sass. With this update we can remove the trasnitional legacy `url()` parsing logic. Fixes sass#1096
This PR activates specs for sass/libsass#1096
This PR activates specs for sass/libsass#1096
This is a continuation of the previous work done to bring our `url()` parsing up to scratch with Ruby Sass. With this update we can remove the transitional legacy `url()` parsing logic. Fixes sass#1096
This PR activates specs for sass/libsass#1096
quickly tested current master with the following input: /* url-test1: without quotes */
@import url(a
b);
/* url-test1: with quotes */
@import url("a
b");
/* url-test2: with quotes */
@import url("a \d \\d \\\d \\\\d
c \t \n \\t \\n \\\t \\\n \\\\t \\\\n");
/* url-test2: without quotes */
@import url(a \d \\d \\\d \\\\d
c \t \n \\t \\n \\\t \\\n \\\\t \\\\n); LibSass: /* url-test1: without quotes */
@import url(a b);
/* url-test1: with quotes */
\a b"); url("a
/* url-test2: with quotes */
\a c t n \\t \\n \\t \\n \\\\t \\\\n");
/* url-test2: without quotes */
@import url(a \d \\d \\\d \\\\d c \t \n \\t \\n \\\t \\\n \\\\t \\\\n); RubySass: /* url-test1: without quotes */
@import url(a b);
/* url-test1: with quotes */
@import url("a\a b");
/* url-test2: with quotes */
@import url("a
\\d \\
\\\\d\a c t n \\t \\n \\t \\n \\\\t \\\\n");
/* url-test2: without quotes */
@import url(a \d \\d \\\d \\\\d c \t \n \\t \\n \\\t \\\n \\\\t \\\\n); IMO, |
Interesting. I just tested with 0f929a5 and got identical output (minus deprecation warnings) /* url-test1: without quotes */
@import url(a b);
/* url-test1: with quotes */
@import url("a\a b");
/* url-test2: with quotes */
\\\\d\a c t n \\t \\n \\t \\n \\\\t \\\\n");
/* url-test2: without quotes */
@import url(a \d \\d \\\d \\\\d c \t \n \\t \\n \\\t \\\n \\\\t \\\\n); |
Yup, I tested on both Mac and Windows, the result is identical to yours. ~/Documents/projects/libsass/sassc/bin/sassc ~/Documents/temp/blah.scss |
@am11 sorry I'm not following your previous comment. Please be more explicitly. Can you please post the output you're seeing on Windows, and how it differs from Mac. Interestingly I'm unable to get the Ruby Sass output you've provided locally (on Mac), but I do see it on sassmeister. |
I am running Mac and Windows 10 via Parallels. I am using sassc. Mac (sassc running on Terminal): ~/Documents/projects/libsass/sassc/bin/sassc ~/Documents/temp/blah.scss /* url-test1: without quotes */
@import url(a b);
/* url-test1: with quotes */
@import url("a\a b");
/* url-test2: with quotes */
\\\\d\a c t n \\t \\n \\t \\n \\\\t \\\\n");
/* url-test2: without quotes */
@import url(a \d \\d \\\d \\\\d c \t \n \\t \\n \\\t \\\n \\\\t \\\\n); Windows (sassc running on PowerShell): ~/Documents/projects/libsass/sassc/bin/sassc ~/Documents/temp/blah.scss /* url-test1: without quotes */
@import url(a b);
/* url-test1: with quotes */
\a b"); url("a
/* url-test2: with quotes */
\a c t n \\t \\n \\t \\n \\\\t \\\\n");
/* url-test2: without quotes */
@import url(a \d \\d \\\d \\\\d c \t \n \\t \\n \\\t \\\n \\\\t \\\\n); Line below Line below |
@xzyfer, sorry I was looking at the CLI output which was broken in both PowerShell and Terminal in different ways. I just piped to a file and saw the output in editor. scssc blah.scss > blah.css Mac (TextEdit) /* url-test1: without quotes */
@import url(a b);
/* url-test1: with quotes */
@import url("a\a b");
/* url-test2: with quotes */
@import url("a
\\d \\
\\\\d\a c t n \\t \\n \\t \\n \\\\t \\\\n");
/* url-test2: without quotes */
@import url(a \d \\d \\\d \\\\d c \t \n \\t \\n \\\t \\\n \\\\t \\\\n); Windows (Visual Studio and then HexEdit to check what's going on): /* url-test1: without quotes */
@import url(a b);
/* url-test1: with quotes */
@import url("a
\a b");
/* url-test2: with quotes */
@import url("a
\\d \\
\\\\d
\a c t n \\t \\n \\t \\n \\\\t \\\\n");
/* url-test2: without quotes */
@import url(a \d \\d \\\d \\\\d c \t \n \\t \\n \\\t \\\n \\\\t \\\\n); Note that in Windows output, the extra line before each |
@xzyfer, I have confirmed that When compiling this input sample on Mac it prints: Any ideas where this |
@am11 nothing comes to mind. Also I don't think this patch affected quoted
|
Also if you include
on line 657 the AST tree will be dumped to the console just before the output phase begins. |
With debugger, on Mac:
Windows:
Line 10 indicates Mac: You are right, this issue was present before your fix: 2ecaa66. Note that before 15913ab, my sample was throwing SIGSEGV on both OSes, so I tested just one case: |
Input: ```scss @import url("a b"); ``` Output on Windows: ```css "@import url(\"a\r\a b\")"; ``` Output on Unix (alinged with Ruby Sass, hence the expected output): ```css "@import url(\"a\a b\")"; ``` See: sass#1096 (comment) for details.
Input: ```scss @import url("a b"); ``` Output on Windows: ``` "@import url(\"a\r\a b\");" ``` Output on Unix (alinged with Ruby Sass, hence the expected output): ``` "@import url(\"a\a b\");" ``` See: sass#1096 (comment) for details.
Input: ```scss @import url("a b"); ``` Output on Windows: ``` "@import url(\"a\r\a b\");" ``` Output on Unix (alinged with Ruby Sass, hence the expected output): ``` "@import url(\"a\a b\");" ``` See: sass#1096 (comment) for details.
Input: ```scss @import url("a b"); ``` Output on Windows: ``` "@import url(\"a\r\a b\");" ``` Output on Unix (alinged with Ruby Sass, hence the expected output): ``` "@import url(\"a\a b\");" ``` See: sass#1096 (comment) for details.
This PR activates specs for sass/libsass#1096
Test:
LibSass master (0dd6543) errors:
LibSass 3.1 outputs:
RubySass v3.4.12 outputs:
Related test:
RubySass throws the following error:
LibSass master (0dd6543) errors:
LibSass 3.1 outputs:
The text was updated successfully, but these errors were encountered: