Skip to content

Commit

Permalink
Merge remote-tracking branch 'nex3/stable' into stable
Browse files Browse the repository at this point in the history
Conflicts:
	doc-src/SASS_CHANGELOG.md
  • Loading branch information
chriseppstein committed Jul 30, 2014
2 parents c00446c + 7389dba commit 6210346
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
3.3.10
3.3.11
8 changes: 6 additions & 2 deletions doc-src/SASS_CHANGELOG.md
Expand Up @@ -3,10 +3,10 @@
* Table of contents
{:toc}

## 3.3.11 (UNRELEASED)
## 3.3.12 (UNRELEASED)

* The Sass::Compiler class has a number of new minor features to support
Compass's compilation needs:
Compass's compilation needs:

* The template_deleted event of the Sass Compiler class now runs before the
side-effect events.
Expand All @@ -20,6 +20,10 @@ Compass's compilation needs:
* The Sass Compiler can now be made to skip the initial update
when watching.

## 3.3.11 (25 July 2014)

* `str-slice()` now correctly returns an empty string when `$end-at` is 0.

## 3.3.10 (11 July 2014)

* Properly encode URLs in sourcemaps.
Expand Down
1 change: 1 addition & 0 deletions lib/sass/script/functions.rb
Expand Up @@ -1465,6 +1465,7 @@ def str_slice(string, start_at, end_at = nil)
end_at = number(-1) if end_at.nil?
assert_unit end_at, nil, "end-at"

return Sass::Script::Value::String.new("", string.type) if end_at.value == 0
s = start_at.value > 0 ? start_at.value - 1 : start_at.value
e = end_at.value > 0 ? end_at.value - 1 : end_at.value
s = string.value.length + s if s < 0
Expand Down
1 change: 1 addition & 0 deletions test/sass/functions_test.rb
Expand Up @@ -995,6 +995,7 @@ def test_str_slice
assert_equal('ab', evaluate('str-slice(abcd,1,2)')) # for completeness
assert_equal('abcd', evaluate('str-slice(abcd,1,4)')) # at the end points
assert_equal('abcd', evaluate('str-slice(abcd,0,4)')) # when start is before the start of the string
assert_equal('', evaluate('str-slice(abcd,1,0)')) # when end is before the start of the string
assert_equal('abcd', evaluate('str-slice(abcd,1,100)')) # when end is past the end of the string
assert_equal('', evaluate('str-slice(abcd,2,1)')) # when end is before start
assert_equal('"bc"', evaluate('str-slice("abcd",2,3)')) # when used with a quoted string
Expand Down

0 comments on commit 6210346

Please sign in to comment.