Project

General

Profile

Actions

Backport #4497

closed

REXML Pretty formater does use specified 'width' to wrap lines

Added by mfrasca (Michael Frasca) about 13 years ago. Updated almost 5 years ago.

Status:
Closed
Assignee:
-
[ruby-core:<unknown>]

Description

=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


Files

ruby-core-bug-4497.patch (465 Bytes) ruby-core-bug-4497.patch PATCH - Bug 4497 mfrasca (Michael Frasca), 03/14/2011 03:03 AM
Actions

Also available in: Atom PDF

Like0
Like0Like0