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

str-slice() $end-at should default to -1 if omitted #816

Merged
merged 1 commit into from
Jan 7, 2015

Conversation

xzyfer
Copy link
Contributor

@xzyfer xzyfer commented Jan 7, 2015

This PR fixes a regression in str-slice() when $end-at is omitted.

Fixes #815. Specs added sass/sass-spec#225.

@xzyfer xzyfer force-pushed the fix/str-slice-end-at-0 branch from a191d66 to 5a848e7 Compare January 7, 2015 06:07
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) when pulling 5a848e7 on xzyfer:fix/str-slice-end-at-0 into 0b59526 on sass:master.

xzyfer added a commit that referenced this pull request Jan 7, 2015
str-slice() $end-at should default to -1 if omitted
@xzyfer xzyfer merged commit 0a2fedb into sass:master Jan 7, 2015
if(m->value() == 0) {
if(!quotemark) return new (ctx.mem) Null(pstate);
newstr = "";
} else if(start == end && m->value() != 0) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

&& m->value() != 0 is redundant. I'll clean this up next time.

@xzyfer xzyfer added this to the 3.2 milestone Jan 7, 2015
@xzyfer xzyfer deleted the fix/str-slice-end-at-0 branch January 7, 2015 06:13
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.

str-slice returns incorrect value when last $end-at is omitted
2 participants