diff options
| author | ser <ser@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-04-24 02:04:10 +0000 |
|---|---|---|
| committer | ser <ser@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-04-24 02:04:10 +0000 |
| commit | 555b6807e3c3d58107eaba7cb6030105ac9bf7aa (patch) | |
| tree | 47bfabacac5fcad2f67cffa5f2b0eb80f064d4c6 /lib/rexml/element.rb | |
| parent | 3a7438b8b8ffea931a81a43a15a395aa3df80491 (diff) | |
| download | ruby-555b6807e3c3d58107eaba7cb6030105ac9bf7aa.tar.gz ruby-555b6807e3c3d58107eaba7cb6030105ac9bf7aa.tar.xz ruby-555b6807e3c3d58107eaba7cb6030105ac9bf7aa.zip | |
-
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@6211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rexml/element.rb')
| -rw-r--r-- | lib/rexml/element.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/rexml/element.rb b/lib/rexml/element.rb index aba57d708..40cac168b 100644 --- a/lib/rexml/element.rb +++ b/lib/rexml/element.rb @@ -635,7 +635,12 @@ module REXML end unless @attributes.empty? if @children.empty? - writer << " " if ie_hack + if transitive and indent>-1 + writer << "\n" + indent( writer, indent ) + elsif ie_hack + writer << " " + end writer << "/" else if transitive and indent>-1 and !@children[0].kind_of? Text @@ -646,7 +651,7 @@ module REXML write_children( writer, indent, transitive, ie_hack ) writer << "</#{expanded_name}" end - if transitive and indent>-1 + if transitive and indent>-1 and !@children.empty? writer << "\n" indent -= 1 if next_sibling.nil? indent(writer, indent) |
