diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-12-11 01:20:23 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-12-11 01:20:23 +0000 |
commit | bc53f80b3791d3c73db44c2e454c98172a84917f (patch) | |
tree | 733b71f72a09fa40eaa71a8337e2b9b4b38ce9f2 /lib/rexml/formatters | |
parent | 54a722bd42a1135e4ee064137ffeac86a7784328 (diff) | |
download | ruby-bc53f80b3791d3c73db44c2e454c98172a84917f.tar.gz |
* lib/rexml/document.rb (REXML::Document#write): require
rexml/formatters/transitive if transitive flag is on. a patch
from akira yamada in [ruby-dev:36230]. fix #553
* lib/rexml/element.rb (REXML::Element#write): ditto.
* lib/rexml/formatters/transitive.rb (REXML::Formatters::Transitive#write_element):
add hack for IE. [ruby-dev:36230]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rexml/formatters')
-rw-r--r-- | lib/rexml/formatters/transitive.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/rexml/formatters/transitive.rb b/lib/rexml/formatters/transitive.rb index 1d80f21fbb..6083f0390b 100644 --- a/lib/rexml/formatters/transitive.rb +++ b/lib/rexml/formatters/transitive.rb @@ -12,9 +12,10 @@ module REXML # formatted. Since this formatter does not alter whitespace nodes, the # results of formatting already formatted XML will be odd. class Transitive < Default - def initialize( indentation=2 ) + def initialize( indentation=2, ie_hack=false ) @indentation = indentation @level = 0 + @ie_hack = ie_hack end protected @@ -29,6 +30,7 @@ module REXML output << "\n" output << ' '*@level if node.children.empty? + output << " " if @ie_hack output << "/" else output << ">" |