aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rexml/formatters/transitive.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rexml/formatters/transitive.rb')
-rw-r--r--lib/rexml/formatters/transitive.rb4
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 << ">"