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
39
vendor/plugins/HTML5lib/testdata/serializer/injectmeta.test
vendored
Normal file
39
vendor/plugins/HTML5lib/testdata/serializer/injectmeta.test
vendored
Normal file
|
@ -0,0 +1,39 @@
|
|||
{"tests": [
|
||||
|
||||
{"description": "no encoding",
|
||||
"options": {"inject_meta_charset": true},
|
||||
"input": [["EmptyTag", "head", {}]],
|
||||
"expected": ["<head>"]
|
||||
},
|
||||
|
||||
{"description": "empytag head",
|
||||
"options": {"inject_meta_charset": true, "encoding":"utf-8"},
|
||||
"input": [["EmptyTag", "head", {}]],
|
||||
"expected": ["<head><meta charset=utf-8>"]
|
||||
},
|
||||
|
||||
{"description": "head w/title",
|
||||
"options": {"inject_meta_charset": true, "encoding":"utf-8"},
|
||||
"input": [["StartTag", "head", {}], ["StartTag","title",{}], ["Characters", "foo"],["EndTag", "title"], ["EndTag", "head"]],
|
||||
"expected": ["<head><meta charset=utf-8><title>foo</title>"]
|
||||
},
|
||||
|
||||
{"description": "head w/meta-charset",
|
||||
"options": {"inject_meta_charset": true, "encoding":"utf-8"},
|
||||
"input": [["StartTag", "head", {}], ["EmptyTag","meta",{"charset":"ascii"}], ["EndTag", "head"]],
|
||||
"expected": ["<head><meta charset=utf-8>"]
|
||||
},
|
||||
|
||||
{"description": "head w/robots",
|
||||
"options": {"inject_meta_charset": true, "encoding":"utf-8"},
|
||||
"input": [["StartTag", "head", {}], ["EmptyTag","meta",{"name":"robots","content":"noindex"}], ["EndTag", "head"]],
|
||||
"expected": ["<head><meta charset=utf-8><meta content=noindex name=robots>"]
|
||||
},
|
||||
|
||||
{"description": "head w/robots & charset",
|
||||
"options": {"inject_meta_charset": true, "encoding":"utf-8"},
|
||||
"input": [["StartTag", "head", {}], ["EmptyTag","meta",{"name":"robots","content":"noindex"}], ["EmptyTag","meta",{"charset":"ascii"}], ["EndTag", "head"]],
|
||||
"expected": ["<head><meta content=noindex name=robots><meta charset=utf-8>"]
|
||||
}
|
||||
|
||||
]}
|
Loading…
Add table
Add a link
Reference in a new issue