Project

General

Profile

Actions

Bug #4498

closed

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

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

Status:
Closed
Target version:
ruby -v:
1.9.2
Backport:
[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

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-4498.patch (465 Bytes) ruby-core-bug-4498.patch PATCH - Bug 4498 mfrasca (Michael Frasca), 03/14/2011 03:02 AM
ruby-core-bug-4498.patch (465 Bytes) ruby-core-bug-4498.patch mfrasca (Michael Frasca), 03/25/2011 06:23 AM
ruby-core-bug-4498.patch (465 Bytes) ruby-core-bug-4498.patch mfrasca (Michael Frasca), 04/12/2011 08:17 PM
ruby-core-bug-4498.patch (465 Bytes) ruby-core-bug-4498.patch mfrasca (Michael Frasca), 04/12/2011 08:18 PM

Related issues 1 (0 open1 closed)

Is duplicate of Ruby master - Bug #5892: REXML always wraps long tag text regardless the page width setting.Rejectedkou (Kouhei Sutou)01/13/2012Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0