[Compass Core] The enumerate function now accepts an optional argument to specify the separator. Closes GH-46.

This commit is contained in:
Chris Eppstein 2009-09-24 08:59:33 -07:00
parent 65d6d69497
commit e0732c8700
2 changed files with 8 additions and 2 deletions

View File

@ -1,6 +1,12 @@
COMPASS CHANGELOG COMPASS CHANGELOG
================= =================
0.8.17 (September 24, 2009)
---------------------------
* The enumerate function now accepts an optional fourth parameter that specifies the separator to be used.
Enables fixing a bug in the Compass 960 Plugin.
0.8.16 (September 12, 2009) 0.8.16 (September 12, 2009)
--------------------------- ---------------------------

View File

@ -1,6 +1,6 @@
module Compass::SassExtensions::Functions::Enumerate module Compass::SassExtensions::Functions::Enumerate
def enumerate(prefix, from, through) def enumerate(prefix, from, through, separator = "-")
selectors = (from.value..through.value).map{|i| "#{prefix.value}-#{i}"}.join(", ") selectors = (from.value..through.value).map{|i| "#{prefix.value}#{separator}#{i}"}.join(", ")
Sass::Script::String.new(selectors) Sass::Script::String.new(selectors)
end end
end end