More fixes, sync with HTML5lib
Do a better job with the wrapper <div>s added by xhtmldiff and Maruku's to_html_tree method. More tests fixed.
This commit is contained in:
parent
3ca33e52b5
commit
3de374d6c1
20 changed files with 541 additions and 118 deletions
|
@ -24,7 +24,7 @@ class JsonWalker < HTML5lib::TreeWalkers::Base
|
|||
when 'Doctype'
|
||||
yield doctype(token[1])
|
||||
else
|
||||
raise ValueError("Unknown token type: " + type)
|
||||
raise "Unknown token type: " + token[0]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -37,7 +37,10 @@ class Html5SerializeTestcase < Test::Unit::TestCase
|
|||
tests['tests'].each_with_index do |test, index|
|
||||
|
||||
define_method "test_#{test_name}_#{index+1}" do
|
||||
next if test_name == 'whitespace' #TODO
|
||||
if test["options"] and test["options"]["encoding"]
|
||||
test["options"][:encoding] = test["options"]["encoding"]
|
||||
end
|
||||
|
||||
result = HTML5lib::HTMLSerializer.
|
||||
serialize(JsonWalker.new(test["input"]), (test["options"] || {}))
|
||||
expected = test["expected"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue