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

Incorrect str-slice() behavior #2240

Closed
nex3 opened this issue Dec 11, 2016 · 0 comments
Closed

Incorrect str-slice() behavior #2240

nex3 opened this issue Dec 11, 2016 · 0 comments
Milestone

Comments

@nex3
Copy link
Contributor

nex3 commented Dec 11, 2016

LibSass replicates a Ruby Sass bug in the str-slice() function: if the $end-at parameter is negative and its absolute value is between the length of the string and two times the length of the string, the function should return an empty string, but it doesn't. For example, str-slice("abcdef", 0, -8) should return "" but actually returns "abcde".

I'm working on a fix for Ruby Sass. Once I land it, I'll mark specs affected by this as TODO for LibSass.

xzyfer added a commit to xzyfer/libsass that referenced this issue Dec 11, 2016
When is `$end-at` is more negative than the length of the string
return an empty string.

Fixes sass#2240
Spec sass/sass-spec#997
xzyfer added a commit to xzyfer/libsass that referenced this issue Dec 15, 2016
@xzyfer xzyfer added this to the 3.4.1 milestone Dec 18, 2016
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

No branches or pull requests

2 participants