lib/htmlcompressor/compressor.rb in htmlcompressor-0.0.3 vs lib/htmlcompressor/compressor.rb in htmlcompressor-0.0.4

- old
+ new

@@ -301,16 +301,18 @@ end # preserve TEXTAREA tags index = -1 html = html.gsub(TA_PATTERN) do |match| + index += 1 + if $2.strip.length > 0 taBlocks << $2 - index += 1 - $1 + message_format(TEMP_TEXT_AREA_BLOCK, index) + $3 else - '' + taBlocks << '' end + + $1 + message_format(TEMP_TEXT_AREA_BLOCK, index) + $3 end # preserve line breaks if @options[:preserve_line_breaks] index = -1 \ No newline at end of file