diff options
Diffstat (limited to 'lib/rexml')
-rw-r--r-- | lib/rexml/formatters/pretty.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/rexml/formatters/pretty.rb b/lib/rexml/formatters/pretty.rb index 296e607687..84c442e8bb 100644 --- a/lib/rexml/formatters/pretty.rb +++ b/lib/rexml/formatters/pretty.rb @@ -129,6 +129,7 @@ module REXML # Recursively wrap string at width. return string if string.length <= width place = string.rindex(' ', width) # Position in string with last ' ' before cutoff + return string if place.nil? return string[0,place] + "\n" + wrap(string[place+1..-1], width) end |