Bundle Latest REXML

Sam Ruby has been doing a bang-up job fixing the bugs in REXML.
Who knows when these improvements will trickle down to vendor distributions of Ruby.
In the meantime, let's bundle the latest version of REXML with Instiki.
We check the version number of the bundled REXML against that of the System REXML, and use whichever is later.
This commit is contained in:
Jacques Distler 2008-01-11 23:53:29 -06:00
parent 1085168bbf
commit 38ae064b8a
146 changed files with 11105 additions and 136 deletions

View file

@ -204,7 +204,18 @@ def run_test(filename, its_ok, verbose=true)
})
div = doc.root
xml =""
div.write_children(xml,indent=1,transitive=true,ie_hack=false)
indent=1
if $rexml_new_version
formatter = if indent > -1
REXML::Formatters::Pretty.new( indent, ie_hack=false )
else
REXML::Formatters::Default.new( ie_hack=false )
end
formatter.write( div, xml)
else
div.write(xml,indent,transitive=true,ie_hack=false)
end
xml.gsub!("\A<div>(.*)</div>\Z", "\1")
f.write xml
rescue Exception=>e
f.puts "Error: #{e.inspect}"