Fixes a bug in the pretty printer related to an incomplete refactoring.
Merge code cleanups Fixes another bug related to the formatting code refactoring in 3.1.7 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
0e83f22cf5
commit
7e168983ce
@ -57,8 +57,11 @@ module REXML
|
|||||||
if compact
|
if compact
|
||||||
if node.children.inject(true) {|s,c| s & c.kind_of?(Text)}
|
if node.children.inject(true) {|s,c| s & c.kind_of?(Text)}
|
||||||
string = ""
|
string = ""
|
||||||
node.children.each { |child| write( child, string, 0 ) }
|
old_level = @level
|
||||||
if string.length + @level < @width
|
@level = 0
|
||||||
|
node.children.each { |child| write( child, string ) }
|
||||||
|
@level = old_level
|
||||||
|
if string.length < @width
|
||||||
output << string
|
output << string
|
||||||
skip = true
|
skip = true
|
||||||
end
|
end
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
require "rexml/parseexception"
|
require "rexml/parseexception"
|
||||||
|
require "rexml/formatters/pretty"
|
||||||
|
require "rexml/formatters/default"
|
||||||
|
|
||||||
module REXML
|
module REXML
|
||||||
# Represents a node in the tree. Nodes are never encountered except as
|
# Represents a node in the tree. Nodes are never encountered except as
|
||||||
|
@ -10,8 +10,8 @@
|
|||||||
#
|
#
|
||||||
# Main page:: http://www.germane-software.com/software/rexml
|
# Main page:: http://www.germane-software.com/software/rexml
|
||||||
# Author:: Sean Russell <serATgermaneHYPHENsoftwareDOTcom>
|
# Author:: Sean Russell <serATgermaneHYPHENsoftwareDOTcom>
|
||||||
# Version:: 3.1.7
|
# Version:: 3.1.7.1
|
||||||
# Date:: 2007/206
|
# Date:: 2007/209
|
||||||
#
|
#
|
||||||
# This API documentation can be downloaded from the REXML home page, or can
|
# This API documentation can be downloaded from the REXML home page, or can
|
||||||
# be accessed online[http://www.germane-software.com/software/rexml_doc]
|
# be accessed online[http://www.germane-software.com/software/rexml_doc]
|
||||||
@ -21,9 +21,9 @@
|
|||||||
# online[http://www.germane-software.com/software/rexml/docs/tutorial.html]
|
# online[http://www.germane-software.com/software/rexml/docs/tutorial.html]
|
||||||
module REXML
|
module REXML
|
||||||
COPYRIGHT = "Copyright © 2001-2007 Sean Russell <ser@germane-software.com>"
|
COPYRIGHT = "Copyright © 2001-2007 Sean Russell <ser@germane-software.com>"
|
||||||
DATE = "2007/206"
|
DATE = "2007/209"
|
||||||
VERSION = "3.1.7"
|
VERSION = "3.1.7.1"
|
||||||
REVISION = "$Revision$".gsub(/\$Revision:|\$/,'').strip
|
REVISION = "$Revision: 1270$".gsub(/\$Revision:|\$/,'').strip
|
||||||
REVISION = "$Revision$".gsub(/\$Revision:|\$/,'').strip
|
REVISION = "$Revision$".gsub(/\$Revision:|\$/,'').strip
|
||||||
|
|
||||||
Copyright = COPYRIGHT
|
Copyright = COPYRIGHT
|
||||||
|
Loading…
x
Reference in New Issue
Block a user