Skip to content

Commit

Permalink
Compression only removes newlines. Doesn't touch spaces. Closes less#6
Browse files Browse the repository at this point in the history
  • Loading branch information
augustl committed Sep 18, 2009
1 parent 653c22e commit b22fcd5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/more.rb
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def generate(path_as_array)
source = pathname_from_array(path_as_array)
engine = File.open(source) {|f| Less::Engine.new(f) }
css = engine.to_css
css.delete!(" \n") if self.compression?
css.delete!("\n") if self.compression?
css
end

Expand Down
2 changes: 1 addition & 1 deletion test/more_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def test_generate
Less::More.source_path = File.join(File.dirname(__FILE__), 'less_files')
Less::More.compression = true

assert_equal ".allforms{font-size:110%;}body{color:#222222;}form{font-size:110%;color:#ffffff;}", Less::More.generate(["test"])
assert_equal ".allforms { font-size: 110%; }body { color: #222222; }form { font-size: 110%; color: #ffffff;}", Less::More.generate(["test"])
end

def test_pathname_from_array
Expand Down

0 comments on commit b22fcd5

Please sign in to comment.