Project

General

Profile

Actions

Bug #5892

closed

REXML always wraps long tag text regardless the page width setting.

Added by dimitri-lo2u (Dimitri Geshef) about 12 years ago. Updated about 12 years ago.

Status:
Rejected
Target version:
ruby -v:
ruby 1.9.2p180 (2011-02-18) [i386-mingw32]
Backport:
[ruby-core:42112]

Description

When ones prints a REXML document that contains a tag with a long text (with space chars), the REXML::Formatters::Pretty formatter will force a line wrapping at column 80.
If one changes the value of the width attribute of the formatter to a very large value does not change the result.
In other words, the formatter ignores the value of the 'width' attribute.
The REXML version used is:
REXML VERSION = "3.1.7.3"
REXML REVISION = 26193

Apparently, the defect lies in the method REXML::Formatters::Pretty#write_text.
There is a statement with a hardcoded value of 80.
Look in the .rb file in attachment for a possible fix of this bug.


Files

XML_text_wrapping.rb (2.33 KB) XML_text_wrapping.rb Code with defect and possible bug fix dimitri-lo2u (Dimitri Geshef), 01/13/2012 10:42 PM

Related issues 1 (0 open1 closed)

Has duplicate Ruby master - Bug #4498: REXML Pretty formater does use specified 'width' to wrap linesClosedkou (Kouhei Sutou)03/13/2011Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0