Actions
Bug #4498
closedREXML Pretty formater does use specified 'width' to wrap lines
Bug #4498:
REXML Pretty formater does use specified 'width' to wrap lines
ruby -v:
1.9.2
Backport:
Description
=begin
REXML::Formatters::Pretty has 'width' attribute used to wrap lines. This is not used when the wrap method is invoked
pretty.rb¶
def write_text( node, output )
s = node.to_s()
s.gsub!(/\s/,' ')
s.squeeze!(" ")
s = wrap(s, 80-@level) ## HERE - 80 is hard coded, value should depend on @width and @level (e.g. @width - @level)
s = indent_text(s, @level, " ", true)
output << (' '*@level + s)
end
=end
Files
Actions