mirror of
https://github.com/beautifier/js-beautify.git
synced 2024-11-27 14:40:23 +00:00
add a span attribute wrapping test, too
This commit is contained in:
parent
0d3d6daaef
commit
95da55112d
@ -395,6 +395,16 @@ function run_html_tests(test_obj, Urlencoded, js_beautify, html_beautify, css_be
|
||||
' target="_blank"><img src="test.jpg" /></a><a href="/test/"\n' +
|
||||
' target="_blank"><img src="test.jpg" /></a>\n' +
|
||||
'</p>');
|
||||
test_fragment(
|
||||
'<p>\n' +
|
||||
' <span data-not-a-href="/test/" data-totally-not-a-target="_blank"><img src="test.jpg" /></span><span data-not-a-href="/test/" data-totally-not-a-target="_blank"><img src="test.jpg" /></span>\n' +
|
||||
'</p>',
|
||||
// -- output --
|
||||
'<p>\n' +
|
||||
' <span data-not-a-href="/test/"\n' +
|
||||
' data-totally-not-a-target="_blank"><img src="test.jpg" /></span><span data-not-a-href="/test/"\n' +
|
||||
' data-totally-not-a-target="_blank"><img src="test.jpg" /></span>\n' +
|
||||
'</p>');
|
||||
|
||||
|
||||
//============================================================
|
||||
|
@ -312,6 +312,11 @@ exports.test_data = {
|
||||
fragment: true,
|
||||
input: '<p>\n <a href="/test/" target="_blank"><img src="test.jpg" /></a><a href="/test/" target="_blank"><img src="test.jpg" /></a>\n</p>',
|
||||
output: '<p>\n <a href="/test/"\n target="_blank"><img src="test.jpg" /></a><a href="/test/"\n target="_blank"><img src="test.jpg" /></a>\n</p>'
|
||||
},
|
||||
{
|
||||
fragment: true,
|
||||
input: '<p>\n <span data-not-a-href="/test/" data-totally-not-a-target="_blank"><img src="test.jpg" /></span><span data-not-a-href="/test/" data-totally-not-a-target="_blank"><img src="test.jpg" /></span>\n</p>',
|
||||
output: '<p>\n <span data-not-a-href="/test/"\n data-totally-not-a-target="_blank"><img src="test.jpg" /></span><span data-not-a-href="/test/"\n data-totally-not-a-target="_blank"><img src="test.jpg" /></span>\n</p>'
|
||||
}]
|
||||
}, {
|
||||
name: "Attribute Wrap",
|
||||
|
Loading…
Reference in New Issue
Block a user