Skip to content
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

add test for escaped #{} #218

Closed
wants to merge 2 commits into from
Closed

Conversation

smikes
Copy link

@smikes smikes commented Jan 2, 2015

The contents of expected_output.css were generated with sass @ 3.4.9 ; I believe this behavior has not changed in the sass 3.0 line but I have not verified this.

In a string, the sequence #{ introduces an interpolation except when it is escaped with backslash: \#{. Ruby sass implements this, but libsass does not. See sass/libsass#798 for bugfix to libsass.

@xzyfer
Copy link
Contributor

xzyfer commented Jan 3, 2015

Hi @smikes thanks for this. Since this feature is currently unimplemented in Libsass can you please move this file into the libsass-todo-tests folder?

@smikes
Copy link
Author

smikes commented Jan 3, 2015

@xzyfer Sure, but when the sass/libsass#798 is landed it will need to be moved out of TODO so is it better to just hold this until the other goes, or do you want me to make the move?

@xzyfer
Copy link
Contributor

xzyfer commented Jan 3, 2015

That's ok, please move it.

It's good practice to always make todo tests. It's hard to predict when we'll be able to merge sass/libsass#798.

@smikes
Copy link
Author

smikes commented Jan 3, 2015

will do

On Fri, Jan 2, 2015 at 5:46 PM, Michael Mifsud notifications@github.com
wrote:

That's ok, please move it.

It's good practice to always make todo tests. It's hard to predict when
we'll be able to merge sass/libsass#798
sass/libsass#798.


Reply to this email directly or view it on GitHub
#218 (comment).

@smikes
Copy link
Author

smikes commented Jan 3, 2015

OK, tests moved to libsass-todo-tests.

Bonus to doing this is I can add two additional tests, which fail even with the PR noted above. Naively looking for a preceding backslash is actually wrong (even when implemented correctly) because the actual requirement for the #{} to be unescaped is that it is preceded by an even number of backslashes; an odd number of backslashes means it is escaped.

@smikes
Copy link
Author

smikes commented Mar 6, 2015

Closing as irrelevant, since related PR sass/libsass#798 was closed.

@smikes smikes closed this Mar 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants