#/usr/bin/ruby require "htmlsplit" require "htmlrepair" #テスト処理 html = open(ARGV[0]).read out = open(ARGV[1],"w") obj = HTMLSplit.new(html) obj.repair obj.document.each {|e| out.write e.to_s } out.close