From e0732c8700c5903fac60074d0e6443105f48b550 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Thu, 24 Sep 2009 08:59:33 -0700 Subject: [PATCH] [Compass Core] The enumerate function now accepts an optional argument to specify the separator. Closes GH-46. --- CHANGELOG.markdown | 6 ++++++ lib/compass/sass_extensions/functions/enumerate.rb | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.markdown b/CHANGELOG.markdown index 648df5b3..ce689ca3 100644 --- a/CHANGELOG.markdown +++ b/CHANGELOG.markdown @@ -1,6 +1,12 @@ 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) --------------------------- diff --git a/lib/compass/sass_extensions/functions/enumerate.rb b/lib/compass/sass_extensions/functions/enumerate.rb index 88d32401..48f89f73 100644 --- a/lib/compass/sass_extensions/functions/enumerate.rb +++ b/lib/compass/sass_extensions/functions/enumerate.rb @@ -1,6 +1,6 @@ module Compass::SassExtensions::Functions::Enumerate - def enumerate(prefix, from, through) - selectors = (from.value..through.value).map{|i| "#{prefix.value}-#{i}"}.join(", ") + def enumerate(prefix, from, through, separator = "-") + selectors = (from.value..through.value).map{|i| "#{prefix.value}#{separator}#{i}"}.join(", ") Sass::Script::String.new(selectors) end end \ No newline at end of file