lib/compass/fontcustom/sass_extensions.rb in compass-fontcustom-1.1.0 vs lib/compass/fontcustom/sass_extensions.rb in compass-fontcustom-1.2.0

- old
+ new

@@ -76,9 +76,15 @@ file_name = "#{map.filename}.#{type}" font_file = Sass::Script::String.new file_name font_url(font_file).value end + def sanitize_symbol(name) + sanitized = name.value.to_s.gsub(/[.+{};]+/, ' ').strip.gsub(/[ ]+/, '-') + Sass::Script::String.new sanitized + end + Sass::Script::Functions.declare :sanitize_symbol, [:name] + end end end end