lib/wunderbar/node.rb in wunderbar-0.18.2 vs lib/wunderbar/node.rb in wunderbar-0.18.3

- old
+ new

@@ -86,11 +86,11 @@ if @width line += ">" (work+["</#{name}>"]).each do |node| if line.length + node.length > @width result << line.rstrip - line = indent + line = indent.to_s end line += node end else line += ">#{work.join}</#{name}>" @@ -130,10 +130,10 @@ result end end class CDATANode < Node - def self.normalize(data, indent) + def self.normalize(data, indent='') data = data.sub(/\n\s*\Z/, '').sub(/\A\s*\n/, '') unindent = data.sub(/s+\Z/,'').scan(/^ *\S/).map(&:length).min || 0 before = ::Regexp.new('^'.ljust(unindent))