lib/wunderbar/node.rb in wunderbar-1.0.21 vs lib/wunderbar/node.rb in wunderbar-1.0.23
- old
+ new
@@ -93,11 +93,11 @@
if indent and width and (line.length > width or line.include? "\n")
reflowed = IndentedTextNode.reflow(indent, line, width,
options[:indent])
line = reflowed.pop
- result.push *reflowed
+ result.push(*reflowed)
end
end
elsif CompactNode === self and not CompactNode === parent
work = []
walk(work, nil, options)
@@ -276,13 +276,12 @@
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))
- node = @node
data.gsub! before, indent
- data.gsub! /^#{indent}$/, '' if unindent == 0
+ data.gsub!(/^#{indent}$/, '') if unindent == 0
data
end
def serialize(options = {}, result = [], indent='')
if @text and @text.include? "\n"
@@ -340,11 +339,11 @@
text = CDATANode.normalize(@text, indent)
else
text = @text
end
- result.push *IndentedTextNode.reflow(indent,
- text.to_s.gsub(/[&<>\u00A0]/,ESCAPE), options[:width], '')
+ result.push(*IndentedTextNode.reflow(indent,
+ text.to_s.gsub(/[&<>\u00A0]/,ESCAPE), options[:width], ''))
end
end
class ScriptNode < CDATANode
def pre; "//<![CDATA["; end