From: Koichi Sasada Date: 2011-06-11T15:54:31+09:00 Subject: [ruby-core:36993] [Ruby 1.9 - Bug #4498] REXML Pretty formater does use specified 'width' to wrap lines Issue #4498 has been updated by Koichi Sasada. Assignee changed from Michael Frasca to Kouhei Sutou Suto-san, What do you think about it? ---------------------------------------- Bug #4498: REXML Pretty formater does use specified 'width' to wrap lines http://redmine.ruby-lang.org/issues/4498 Author: Michael Frasca Status: Assigned Priority: Normal Assignee: Kouhei Sutou Category: lib Target version: 1.9.x ruby -v: 1.9.2 =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 -- http://redmine.ruby-lang.org