Project

General

Profile

Backport #4497

Updated by jeremyevans0 (Jeremy Evans) over 5 years ago

=begin 
 
 REXML::Formatters::Pretty has 'width' attribute used to wrap lines. This is not used when the wrap method is invoked 

   # pretty.rb - line 86 
   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 
 

Back