Merge adjacent lists when deleting
authorAryeh Gregor <AryehGregor+gitcommit@gmail.com>
Tue, 08 Nov 2011 08:56:11 -0700
changeset 664 b3afc97ff16e
parent 663 9dfe25d9106a
child 665 d461532af710
Merge adjacent lists when deleting

This does not match current browser behavior, but makes more sense from
a user perspective. Note that we merge the lists even if they were
adjacent to start with, and we didn't make them so by deleting anything.
Adjacent lists of the same type don't make sense for us -- it shouldn't
be possible to create them using insertOrderedList/insertUnorderedList,
so it shouldn't be possible to create them using delete either.

Fixes: http://www.w3.org/Bugs/Public/show_bug.cgi?id=13976
conformancetest/data.js
editing.html
implementation.js
source.html
tests.js
--- a/conformancetest/data.js	Tue Nov 08 07:48:41 2011 -0700
+++ b/conformancetest/data.js	Tue Nov 08 08:56:11 2011 -0700
@@ -4175,6 +4175,198 @@
 	[["stylewithcss","true"],["delete",""]],
 	"<quasit style=\"display:block\">fo{}ar</quasit>",
 	{"stylewithcss":[false,false,"",false,true,""],"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol>{}<br><ol><li>bar</ol>",
+	[["stylewithcss","false"],["delete",""]],
+	"<ol><li>foo{}</li><li>bar</li></ol>",
+	{"stylewithcss":[false,true,"",false,false,""],"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol>{}<br><ol><li>bar</ol>",
+	[["stylewithcss","true"],["delete",""]],
+	"<ol><li>foo{}</li><li>bar</li></ol>",
+	{"stylewithcss":[false,false,"",false,true,""],"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol><p>{}<br></p><ol><li>bar</ol>",
+	[["stylewithcss","false"],["delete",""]],
+	"<ol><li>foo{}</li><li>bar</li></ol>",
+	{"stylewithcss":[false,true,"",false,false,""],"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol><p>{}<br></p><ol><li>bar</ol>",
+	[["stylewithcss","true"],["delete",""]],
+	"<ol><li>foo{}</li><li>bar</li></ol>",
+	{"stylewithcss":[false,false,"",false,true,""],"delete":[false,false,"",false,false,""]}],
+["<ol><li><p>foo</ol><p>{}<br></p><ol><li>bar</ol>",
+	[["stylewithcss","false"],["delete",""]],
+	"<ol><li><p>foo{}</p></li><li>bar</li></ol>",
+	{"stylewithcss":[false,true,"",false,false,""],"delete":[false,false,"",false,false,""]}],
+["<ol><li><p>foo</ol><p>{}<br></p><ol><li>bar</ol>",
+	[["stylewithcss","true"],["delete",""]],
+	"<ol><li><p>foo{}</p></li><li>bar</li></ol>",
+	{"stylewithcss":[false,false,"",false,true,""],"delete":[false,false,"",false,false,""]}],
+["<ol id=a><li>foo</ol>{}<br><ol><li>bar</ol>",
+	[["stylewithcss","false"],["delete",""]],
+	"<ol id=\"a\"><li>foo{}</li><li>bar</li></ol>",
+	{"stylewithcss":[false,true,"",false,false,""],"delete":[false,false,"",false,false,""]}],
+["<ol id=a><li>foo</ol>{}<br><ol><li>bar</ol>",
+	[["stylewithcss","true"],["delete",""]],
+	"<ol id=\"a\"><li>foo{}</li><li>bar</li></ol>",
+	{"stylewithcss":[false,false,"",false,true,""],"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol>{}<br><ol id=b><li>bar</ol>",
+	[["stylewithcss","false"],["delete",""]],
+	"<ol><li>foo{}</li><li>bar</li></ol>",
+	{"stylewithcss":[false,true,"",false,false,""],"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol>{}<br><ol id=b><li>bar</ol>",
+	[["stylewithcss","true"],["delete",""]],
+	"<ol><li>foo{}</li><li>bar</li></ol>",
+	{"stylewithcss":[false,false,"",false,true,""],"delete":[false,false,"",false,false,""]}],
+["<ol id=a><li>foo</ol>{}<br><ol id=b><li>bar</ol>",
+	[["stylewithcss","false"],["delete",""]],
+	"<ol id=\"a\"><li>foo{}</li><li>bar</li></ol>",
+	{"stylewithcss":[false,true,"",false,false,""],"delete":[false,false,"",false,false,""]}],
+["<ol id=a><li>foo</ol>{}<br><ol id=b><li>bar</ol>",
+	[["stylewithcss","true"],["delete",""]],
+	"<ol id=\"a\"><li>foo{}</li><li>bar</li></ol>",
+	{"stylewithcss":[false,false,"",false,true,""],"delete":[false,false,"",false,false,""]}],
+["<ol class=a><li>foo</ol>{}<br><ol class=b><li>bar</ol>",
+	[["stylewithcss","false"],["delete",""]],
+	"<ol class=\"a\"><li>foo{}</li><li>bar</li></ol>",
+	{"stylewithcss":[false,true,"",false,false,""],"delete":[false,false,"",false,false,""]}],
+["<ol class=a><li>foo</ol>{}<br><ol class=b><li>bar</ol>",
+	[["stylewithcss","true"],["delete",""]],
+	"<ol class=\"a\"><li>foo{}</li><li>bar</li></ol>",
+	{"stylewithcss":[false,false,"",false,true,""],"delete":[false,false,"",false,false,""]}],
+["<ol><ol><li>foo</ol><li>{}<br></li><ol><li>bar</ol></ol>",
+	[["stylewithcss","false"],["delete",""]],
+	"<ol><ol><li>foo{}</li><li>bar</li></ol></ol>",
+	{"stylewithcss":[false,true,"",false,false,""],"delete":[false,false,"",false,false,""]}],
+["<ol><ol><li>foo</ol><li>{}<br></li><ol><li>bar</ol></ol>",
+	[["stylewithcss","true"],["delete",""]],
+	"<ol><ol><li>foo{}</li><li>bar</li></ol></ol>",
+	{"stylewithcss":[false,false,"",false,true,""],"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo[</ol>bar]<ol><li>baz</ol>",
+	[["stylewithcss","false"],["delete",""]],
+	"<ol><li>foo{}</li><li>baz</li></ol>",
+	{"stylewithcss":[false,true,"",false,false,""],"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo[</ol>bar]<ol><li>baz</ol>",
+	[["stylewithcss","true"],["delete",""]],
+	"<ol><li>foo{}</li><li>baz</li></ol>",
+	{"stylewithcss":[false,false,"",false,true,""],"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo[</ol><p>bar]<ol><li>baz</ol>",
+	[["stylewithcss","false"],["delete",""]],
+	"<ol><li>foo{}</li><li>baz</li></ol>",
+	{"stylewithcss":[false,true,"",false,false,""],"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo[</ol><p>bar]<ol><li>baz</ol>",
+	[["stylewithcss","true"],["delete",""]],
+	"<ol><li>foo{}</li><li>baz</li></ol>",
+	{"stylewithcss":[false,false,"",false,true,""],"delete":[false,false,"",false,false,""]}],
+["<ol><li><p>foo[</ol><p>bar]<ol><li>baz</ol>",
+	[["stylewithcss","false"],["delete",""]],
+	"<ol><li><p>foo{}</p></li><li>baz</li></ol>",
+	{"stylewithcss":[false,true,"",false,false,""],"delete":[false,false,"",false,false,""]}],
+["<ol><li><p>foo[</ol><p>bar]<ol><li>baz</ol>",
+	[["stylewithcss","true"],["delete",""]],
+	"<ol><li><p>foo{}</p></li><li>baz</li></ol>",
+	{"stylewithcss":[false,false,"",false,true,""],"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo[]</ol><ol><li>bar</ol>",
+	[["stylewithcss","false"],["delete",""]],
+	"<ol><li>fo[]</li></ol><ol><li>bar</li></ol>",
+	{"stylewithcss":[false,true,"",false,false,""],"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo[]</ol><ol><li>bar</ol>",
+	[["stylewithcss","true"],["delete",""]],
+	"<ol><li>fo[]</li></ol><ol><li>bar</li></ol>",
+	{"stylewithcss":[false,false,"",false,true,""],"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol>[bar<ol><li>]baz</ol>",
+	[["stylewithcss","false"],["delete",""]],
+	"<ol><li>foo</li></ol>{}baz",
+	{"stylewithcss":[false,true,"",false,false,""],"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol>[bar<ol><li>]baz</ol>",
+	[["stylewithcss","true"],["delete",""]],
+	"<ol><li>foo</li></ol>{}baz",
+	{"stylewithcss":[false,false,"",false,true,""],"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol><p>[bar<ol><li>]baz</ol>",
+	[["stylewithcss","false"],["delete",""]],
+	"<ol><li>foo</li></ol><p>{}baz</p>",
+	{"stylewithcss":[false,true,"",false,false,""],"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol><p>[bar<ol><li>]baz</ol>",
+	[["stylewithcss","true"],["delete",""]],
+	"<ol><li>foo</li></ol><p>{}baz</p>",
+	{"stylewithcss":[false,false,"",false,true,""],"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol><p>[bar<ol><li><p>]baz</ol>",
+	[["stylewithcss","false"],["delete",""]],
+	"<ol><li>foo</li></ol><p>{}baz</p>",
+	{"stylewithcss":[false,true,"",false,false,""],"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol><p>[bar<ol><li><p>]baz</ol>",
+	[["stylewithcss","true"],["delete",""]],
+	"<ol><li>foo</li></ol><p>{}baz</p>",
+	{"stylewithcss":[false,false,"",false,true,""],"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol><ol><li>b[]ar</ol>",
+	[["stylewithcss","false"],["delete",""]],
+	"<ol><li>foo</li></ol><ol><li>{}ar</li></ol>",
+	{"stylewithcss":[false,true,"",false,false,""],"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol><ol><li>b[]ar</ol>",
+	[["stylewithcss","true"],["delete",""]],
+	"<ol><li>foo</li></ol><ol><li>{}ar</li></ol>",
+	{"stylewithcss":[false,false,"",false,true,""],"delete":[false,false,"",false,false,""]}],
+["<ol><ol><li>foo[</ol><li>bar</ol>baz]<ol><li>quz</ol>",
+	[["stylewithcss","false"],["delete",""]],
+	"<ol><ol><li>foo{}</li></ol><li>quz</li></ol>",
+	{"stylewithcss":[false,true,"",false,false,""],"delete":[false,false,"",false,false,""]}],
+["<ol><ol><li>foo[</ol><li>bar</ol>baz]<ol><li>quz</ol>",
+	[["stylewithcss","true"],["delete",""]],
+	"<ol><ol><li>foo{}</li></ol><li>quz</li></ol>",
+	{"stylewithcss":[false,false,"",false,true,""],"delete":[false,false,"",false,false,""]}],
+["<ul><li>foo</ul>{}<br><ul><li>bar</ul>",
+	[["stylewithcss","false"],["delete",""]],
+	"<ul><li>foo{}</li><li>bar</li></ul>",
+	{"stylewithcss":[false,true,"",false,false,""],"delete":[false,false,"",false,false,""]}],
+["<ul><li>foo</ul>{}<br><ul><li>bar</ul>",
+	[["stylewithcss","true"],["delete",""]],
+	"<ul><li>foo{}</li><li>bar</li></ul>",
+	{"stylewithcss":[false,false,"",false,true,""],"delete":[false,false,"",false,false,""]}],
+["<ul><li>foo</ul><p>{}<br></p><ul><li>bar</ul>",
+	[["stylewithcss","false"],["delete",""]],
+	"<ul><li>foo{}</li><li>bar</li></ul>",
+	{"stylewithcss":[false,true,"",false,false,""],"delete":[false,false,"",false,false,""]}],
+["<ul><li>foo</ul><p>{}<br></p><ul><li>bar</ul>",
+	[["stylewithcss","true"],["delete",""]],
+	"<ul><li>foo{}</li><li>bar</li></ul>",
+	{"stylewithcss":[false,false,"",false,true,""],"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo[<li>bar]</ol><ol><li>baz</ol><ol><li>quz</ol>",
+	[["stylewithcss","false"],["delete",""]],
+	"<ol><li>foo{}</li><li>baz</li><li>quz</li></ol>",
+	{"stylewithcss":[false,true,"",false,false,""],"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo[<li>bar]</ol><ol><li>baz</ol><ol><li>quz</ol>",
+	[["stylewithcss","true"],["delete",""]],
+	"<ol><li>foo{}</li><li>baz</li><li>quz</li></ol>",
+	{"stylewithcss":[false,false,"",false,true,""],"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol>{}<br><ul><li>bar</ul>",
+	[["stylewithcss","false"],["delete",""]],
+	"<ol><li>foo{}</li></ol><ul><li>bar</li></ul>",
+	{"stylewithcss":[false,true,"",false,false,""],"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol>{}<br><ul><li>bar</ul>",
+	[["stylewithcss","true"],["delete",""]],
+	"<ol><li>foo{}</li></ol><ul><li>bar</li></ul>",
+	{"stylewithcss":[false,false,"",false,true,""],"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol><p>{}<br></p><ul><li>bar</ul>",
+	[["stylewithcss","false"],["delete",""]],
+	"<ol><li>foo{}</li></ol><ul><li>bar</li></ul>",
+	{"stylewithcss":[false,true,"",false,false,""],"delete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol><p>{}<br></p><ul><li>bar</ul>",
+	[["stylewithcss","true"],["delete",""]],
+	"<ol><li>foo{}</li></ol><ul><li>bar</li></ul>",
+	{"stylewithcss":[false,false,"",false,true,""],"delete":[false,false,"",false,false,""]}],
+["<ul><li>foo</ul>{}<br><ol><li>bar</ol>",
+	[["stylewithcss","false"],["delete",""]],
+	"<ul><li>foo{}</li></ul><ol><li>bar</li></ol>",
+	{"stylewithcss":[false,true,"",false,false,""],"delete":[false,false,"",false,false,""]}],
+["<ul><li>foo</ul>{}<br><ol><li>bar</ol>",
+	[["stylewithcss","true"],["delete",""]],
+	"<ul><li>foo{}</li></ul><ol><li>bar</li></ol>",
+	{"stylewithcss":[false,false,"",false,true,""],"delete":[false,false,"",false,false,""]}],
+["<ul><li>foo</ul><p>{}<br></p><ol><li>bar</ol>",
+	[["stylewithcss","false"],["delete",""]],
+	"<ul><li>foo{}</li></ul><ol><li>bar</li></ol>",
+	{"stylewithcss":[false,true,"",false,false,""],"delete":[false,false,"",false,false,""]}],
+["<ul><li>foo</ul><p>{}<br></p><ol><li>bar</ol>",
+	[["stylewithcss","true"],["delete",""]],
+	"<ul><li>foo{}</li></ul><ol><li>bar</li></ol>",
+	{"stylewithcss":[false,false,"",false,true,""],"delete":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["stylewithcss","false"],["fontname","sans-serif"]],
 	"foo[]bar",
@@ -10327,6 +10519,206 @@
 	[["stylewithcss","true"],["forwarddelete",""]],
 	"<dl><dt>foo</dt><dd>bar{}baz</dd></dl>",
 	{"stylewithcss":[false,false,"",false,true,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol>{}<br><ol><li>bar</ol>",
+	[["stylewithcss","false"],["forwarddelete",""]],
+	"<ol><li>foo</li></ol>{}bar",
+	{"stylewithcss":[false,true,"",false,false,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol>{}<br><ol><li>bar</ol>",
+	[["stylewithcss","true"],["forwarddelete",""]],
+	"<ol><li>foo</li></ol>{}bar",
+	{"stylewithcss":[false,false,"",false,true,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol><p>{}<br></p><ol><li>bar</ol>",
+	[["stylewithcss","false"],["forwarddelete",""]],
+	"<ol><li>foo</li></ol><p>{}bar</p>",
+	{"stylewithcss":[false,true,"",false,false,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol><p>{}<br></p><ol><li>bar</ol>",
+	[["stylewithcss","true"],["forwarddelete",""]],
+	"<ol><li>foo</li></ol><p>{}bar</p>",
+	{"stylewithcss":[false,false,"",false,true,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li><p>foo</ol><p>{}<br></p><ol><li>bar</ol>",
+	[["stylewithcss","false"],["forwarddelete",""]],
+	"<ol><li><p>foo</p></li></ol><p>{}bar</p>",
+	{"stylewithcss":[false,true,"",false,false,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li><p>foo</ol><p>{}<br></p><ol><li>bar</ol>",
+	[["stylewithcss","true"],["forwarddelete",""]],
+	"<ol><li><p>foo</p></li></ol><p>{}bar</p>",
+	{"stylewithcss":[false,false,"",false,true,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol id=a><li>foo</ol>{}<br><ol><li>bar</ol>",
+	[["stylewithcss","false"],["forwarddelete",""]],
+	"<ol id=\"a\"><li>foo</li></ol>{}bar",
+	{"stylewithcss":[false,true,"",false,false,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol id=a><li>foo</ol>{}<br><ol><li>bar</ol>",
+	[["stylewithcss","true"],["forwarddelete",""]],
+	"<ol id=\"a\"><li>foo</li></ol>{}bar",
+	{"stylewithcss":[false,false,"",false,true,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol>{}<br><ol id=b><li>bar</ol>",
+	[["stylewithcss","false"],["forwarddelete",""]],
+	"<ol><li>foo</li></ol>{}bar",
+	{"stylewithcss":[false,true,"",false,false,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol>{}<br><ol id=b><li>bar</ol>",
+	[["stylewithcss","true"],["forwarddelete",""]],
+	"<ol><li>foo</li></ol>{}bar",
+	{"stylewithcss":[false,false,"",false,true,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol id=a><li>foo</ol>{}<br><ol id=b><li>bar</ol>",
+	[["stylewithcss","false"],["forwarddelete",""]],
+	"<ol id=\"a\"><li>foo</li></ol>{}bar",
+	{"stylewithcss":[false,true,"",false,false,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol id=a><li>foo</ol>{}<br><ol id=b><li>bar</ol>",
+	[["stylewithcss","true"],["forwarddelete",""]],
+	"<ol id=\"a\"><li>foo</li></ol>{}bar",
+	{"stylewithcss":[false,false,"",false,true,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol class=a><li>foo</ol>{}<br><ol class=b><li>bar</ol>",
+	[["stylewithcss","false"],["forwarddelete",""]],
+	"<ol class=\"a\"><li>foo</li></ol>{}bar",
+	{"stylewithcss":[false,true,"",false,false,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol class=a><li>foo</ol>{}<br><ol class=b><li>bar</ol>",
+	[["stylewithcss","true"],["forwarddelete",""]],
+	"<ol class=\"a\"><li>foo</li></ol>{}bar",
+	{"stylewithcss":[false,false,"",false,true,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><ol><li>foo</ol><li>{}<br><ol><li>bar</ol></ol>",
+	[["stylewithcss","false"],["forwarddelete",""]],
+	"<ol><ol><li>foo</li></ol><li>{}bar</li></ol>",
+	{"stylewithcss":[false,true,"",false,false,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><ol><li>foo</ol><li>{}<br><ol><li>bar</ol></ol>",
+	[["stylewithcss","true"],["forwarddelete",""]],
+	"<ol><ol><li>foo</li></ol><li>{}bar</li></ol>",
+	{"stylewithcss":[false,false,"",false,true,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><ol><li>foo</ol><li>{}<br></li><ol><li>bar</ol></ol>",
+	[["stylewithcss","false"],["forwarddelete",""]],
+	"<ol><ol><li>foo</li></ol><li>{}bar</li></ol>",
+	{"stylewithcss":[false,true,"",false,false,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><ol><li>foo</ol><li>{}<br></li><ol><li>bar</ol></ol>",
+	[["stylewithcss","true"],["forwarddelete",""]],
+	"<ol><ol><li>foo</li></ol><li>{}bar</li></ol>",
+	{"stylewithcss":[false,false,"",false,true,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo[</ol>bar]<ol><li>baz</ol>",
+	[["stylewithcss","false"],["forwarddelete",""]],
+	"<ol><li>foo{}</li><li>baz</li></ol>",
+	{"stylewithcss":[false,true,"",false,false,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo[</ol>bar]<ol><li>baz</ol>",
+	[["stylewithcss","true"],["forwarddelete",""]],
+	"<ol><li>foo{}</li><li>baz</li></ol>",
+	{"stylewithcss":[false,false,"",false,true,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo[</ol><p>bar]<ol><li>baz</ol>",
+	[["stylewithcss","false"],["forwarddelete",""]],
+	"<ol><li>foo{}</li><li>baz</li></ol>",
+	{"stylewithcss":[false,true,"",false,false,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo[</ol><p>bar]<ol><li>baz</ol>",
+	[["stylewithcss","true"],["forwarddelete",""]],
+	"<ol><li>foo{}</li><li>baz</li></ol>",
+	{"stylewithcss":[false,false,"",false,true,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li><p>foo[</ol><p>bar]<ol><li>baz</ol>",
+	[["stylewithcss","false"],["forwarddelete",""]],
+	"<ol><li><p>foo{}</p></li><li>baz</li></ol>",
+	{"stylewithcss":[false,true,"",false,false,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li><p>foo[</ol><p>bar]<ol><li>baz</ol>",
+	[["stylewithcss","true"],["forwarddelete",""]],
+	"<ol><li><p>foo{}</p></li><li>baz</li></ol>",
+	{"stylewithcss":[false,false,"",false,true,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>fo[]o</ol><ol><li>bar</ol>",
+	[["stylewithcss","false"],["forwarddelete",""]],
+	"<ol><li>fo[]</li></ol><ol><li>bar</li></ol>",
+	{"stylewithcss":[false,true,"",false,false,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>fo[]o</ol><ol><li>bar</ol>",
+	[["stylewithcss","true"],["forwarddelete",""]],
+	"<ol><li>fo[]</li></ol><ol><li>bar</li></ol>",
+	{"stylewithcss":[false,false,"",false,true,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol>[bar<ol><li>]baz</ol>",
+	[["stylewithcss","false"],["forwarddelete",""]],
+	"<ol><li>foo</li></ol>{}baz",
+	{"stylewithcss":[false,true,"",false,false,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol>[bar<ol><li>]baz</ol>",
+	[["stylewithcss","true"],["forwarddelete",""]],
+	"<ol><li>foo</li></ol>{}baz",
+	{"stylewithcss":[false,false,"",false,true,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol><p>[bar<ol><li>]baz</ol>",
+	[["stylewithcss","false"],["forwarddelete",""]],
+	"<ol><li>foo</li></ol><p>{}baz</p>",
+	{"stylewithcss":[false,true,"",false,false,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol><p>[bar<ol><li>]baz</ol>",
+	[["stylewithcss","true"],["forwarddelete",""]],
+	"<ol><li>foo</li></ol><p>{}baz</p>",
+	{"stylewithcss":[false,false,"",false,true,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol><p>[bar<ol><li><p>]baz</ol>",
+	[["stylewithcss","false"],["forwarddelete",""]],
+	"<ol><li>foo</li></ol><p>{}baz</p>",
+	{"stylewithcss":[false,true,"",false,false,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol><p>[bar<ol><li><p>]baz</ol>",
+	[["stylewithcss","true"],["forwarddelete",""]],
+	"<ol><li>foo</li></ol><p>{}baz</p>",
+	{"stylewithcss":[false,false,"",false,true,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol><ol><li>[]bar</ol>",
+	[["stylewithcss","false"],["forwarddelete",""]],
+	"<ol><li>foo</li></ol><ol><li>{}ar</li></ol>",
+	{"stylewithcss":[false,true,"",false,false,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol><ol><li>[]bar</ol>",
+	[["stylewithcss","true"],["forwarddelete",""]],
+	"<ol><li>foo</li></ol><ol><li>{}ar</li></ol>",
+	{"stylewithcss":[false,false,"",false,true,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><ol><li>foo[</ol><li>bar</ol>baz]<ol><li>quz</ol>",
+	[["stylewithcss","false"],["forwarddelete",""]],
+	"<ol><ol><li>foo{}</li></ol><li>quz</li></ol>",
+	{"stylewithcss":[false,true,"",false,false,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><ol><li>foo[</ol><li>bar</ol>baz]<ol><li>quz</ol>",
+	[["stylewithcss","true"],["forwarddelete",""]],
+	"<ol><ol><li>foo{}</li></ol><li>quz</li></ol>",
+	{"stylewithcss":[false,false,"",false,true,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<ul><li>foo</ul>{}<br><ul><li>bar</ul>",
+	[["stylewithcss","false"],["forwarddelete",""]],
+	"<ul><li>foo</li></ul>{}bar",
+	{"stylewithcss":[false,true,"",false,false,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<ul><li>foo</ul>{}<br><ul><li>bar</ul>",
+	[["stylewithcss","true"],["forwarddelete",""]],
+	"<ul><li>foo</li></ul>{}bar",
+	{"stylewithcss":[false,false,"",false,true,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<ul><li>foo</ul><p>{}<br></p><ul><li>bar</ul>",
+	[["stylewithcss","false"],["forwarddelete",""]],
+	"<ul><li>foo</li></ul><p>{}bar</p>",
+	{"stylewithcss":[false,true,"",false,false,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<ul><li>foo</ul><p>{}<br></p><ul><li>bar</ul>",
+	[["stylewithcss","true"],["forwarddelete",""]],
+	"<ul><li>foo</li></ul><p>{}bar</p>",
+	{"stylewithcss":[false,false,"",false,true,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo[<li>bar]</ol><ol><li>baz</ol><ol><li>quz</ol>",
+	[["stylewithcss","false"],["forwarddelete",""]],
+	"<ol><li>foo{}</li><li>baz</li><li>quz</li></ol>",
+	{"stylewithcss":[false,true,"",false,false,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo[<li>bar]</ol><ol><li>baz</ol><ol><li>quz</ol>",
+	[["stylewithcss","true"],["forwarddelete",""]],
+	"<ol><li>foo{}</li><li>baz</li><li>quz</li></ol>",
+	{"stylewithcss":[false,false,"",false,true,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol>{}<br><ul><li>bar</ul>",
+	[["stylewithcss","false"],["forwarddelete",""]],
+	"<ol><li>foo</li></ol>{}bar",
+	{"stylewithcss":[false,true,"",false,false,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol>{}<br><ul><li>bar</ul>",
+	[["stylewithcss","true"],["forwarddelete",""]],
+	"<ol><li>foo</li></ol>{}bar",
+	{"stylewithcss":[false,false,"",false,true,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol><p>{}<br></p><ul><li>bar</ul>",
+	[["stylewithcss","false"],["forwarddelete",""]],
+	"<ol><li>foo</li></ol><p>{}bar</p>",
+	{"stylewithcss":[false,true,"",false,false,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<ol><li>foo</ol><p>{}<br></p><ul><li>bar</ul>",
+	[["stylewithcss","true"],["forwarddelete",""]],
+	"<ol><li>foo</li></ol><p>{}bar</p>",
+	{"stylewithcss":[false,false,"",false,true,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<ul><li>foo</ul>{}<br><ol><li>bar</ol>",
+	[["stylewithcss","false"],["forwarddelete",""]],
+	"<ul><li>foo</li></ul>{}bar",
+	{"stylewithcss":[false,true,"",false,false,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<ul><li>foo</ul>{}<br><ol><li>bar</ol>",
+	[["stylewithcss","true"],["forwarddelete",""]],
+	"<ul><li>foo</li></ul>{}bar",
+	{"stylewithcss":[false,false,"",false,true,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<ul><li>foo</ul><p>{}<br></p><ol><li>bar</ol>",
+	[["stylewithcss","false"],["forwarddelete",""]],
+	"<ul><li>foo</li></ul><p>{}bar</p>",
+	{"stylewithcss":[false,true,"",false,false,""],"forwarddelete":[false,false,"",false,false,""]}],
+["<ul><li>foo</ul><p>{}<br></p><ol><li>bar</ol>",
+	[["stylewithcss","true"],["forwarddelete",""]],
+	"<ul><li>foo</li></ul><p>{}bar</p>",
+	{"stylewithcss":[false,false,"",false,true,""],"forwarddelete":[false,false,"",false,false,""]}],
 ["foo[]bar",
 	[["stylewithcss","false"],["hilitecolor","#00FFFF"]],
 	"foo[]bar",
--- a/editing.html	Tue Nov 08 07:48:41 2011 -0700
+++ b/editing.html	Tue Nov 08 08:56:11 2011 -0700
@@ -5729,6 +5729,30 @@
     <var title="">parent</var>, then set <var title="">end block</var> to <var title="">parent</var>.
   </ol>
 
+  <li class=note><p>We might have deleted the contents between two lists, in
+  which case we should merge them.  See <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=13976">bug 13976</a>.
+
+  <li>Let <var title="">ancestor</var> be <var title="">start block</var>.
+
+  <li>While <var title="">ancestor</var> has an <a class=external data-anolis-spec=dom href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-tree-inclusive-ancestor title=concept-tree-inclusive-ancestor>inclusive ancestor</a> <code class=external data-anolis-spec=html title="the ol element"><a href=http://www.whatwg.org/specs/web-apps/current-work/multipage/grouping-content.html#the-ol-element>ol</a></code> <a href=#in-the-same-editing-host>in
+  the same editing host</a> whose <code class=external data-anolis-spec=dom title=dom-Node-nextSibling><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-node-nextsibling>nextSibling</a></code> is also an <code class=external data-anolis-spec=html title="the ol element"><a href=http://www.whatwg.org/specs/web-apps/current-work/multipage/grouping-content.html#the-ol-element>ol</a></code> <a href=#in-the-same-editing-host>in
+  the same editing host</a>, or an <a class=external data-anolis-spec=dom href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-tree-inclusive-ancestor title=concept-tree-inclusive-ancestor>inclusive ancestor</a> <code class=external data-anolis-spec=html title="the ul element"><a href=http://www.whatwg.org/specs/web-apps/current-work/multipage/grouping-content.html#the-ul-element>ul</a></code> <a href=#in-the-same-editing-host>in the
+  same editing host</a> whose <code class=external data-anolis-spec=dom title=dom-Node-nextSibling><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-node-nextsibling>nextSibling</a></code> is also a <code class=external data-anolis-spec=html title="the ul element"><a href=http://www.whatwg.org/specs/web-apps/current-work/multipage/grouping-content.html#the-ul-element>ul</a></code> <a href=#in-the-same-editing-host>in the
+  same editing host</a>:
+
+  <ol>
+    <li>While <var title="">ancestor</var> and its <code class=external data-anolis-spec=dom title=dom-Node-nextSibling><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-node-nextsibling>nextSibling</a></code> are not both <code class=external data-anolis-spec=html title="the ol element"><a href=http://www.whatwg.org/specs/web-apps/current-work/multipage/grouping-content.html#the-ol-element>ol</a></code>s
+    <a href=#in-the-same-editing-host>in the same editing host</a>, and are also not both <code class=external data-anolis-spec=html title="the ul element"><a href=http://www.whatwg.org/specs/web-apps/current-work/multipage/grouping-content.html#the-ul-element>ul</a></code>s
+    <a href=#in-the-same-editing-host>in the same editing host</a>, set <var title="">ancestor</var> to its
+    <a class=external data-anolis-spec=dom href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-tree-parent title=concept-tree-parent>parent</a>.
+
+    <li>While <var title="">ancestor</var>'s <code class=external data-anolis-spec=dom title=dom-Node-nextSibling><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-node-nextsibling>nextSibling</a></code> has <a class=external data-anolis-spec=dom href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-tree-child title=concept-tree-child>children</a>, append
+    <var title="">ancestor</var>'s <code class=external data-anolis-spec=dom title=dom-Node-nextSibling><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-node-nextsibling>nextSibling</a></code>'s <code class=external data-anolis-spec=dom title=dom-Node-firstChild><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-node-firstchild>firstChild</a></code> as the last
+    <a class=external data-anolis-spec=dom href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-tree-child title=concept-tree-child>child</a> of <var title="">ancestor</var>, <a href=#preserving-ranges>preserving ranges</a>.
+
+    <li>Remove <var title="">ancestor</var>'s <code class=external data-anolis-spec=dom title=dom-Node-nextSibling><a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-node-nextsibling>nextSibling</a></code> from its <a class=external data-anolis-spec=dom href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-tree-parent title=concept-tree-parent>parent</a>.
+  </ol>
+
   <li><a href=#restore-the-values>Restore the values</a> from <var title="">values</var>.
 
   <li>If <var title="">start block</var> has no <a class=external data-anolis-spec=dom href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-tree-child title=concept-tree-child>children</a>, call
--- a/implementation.js	Tue Nov 08 07:48:41 2011 -0700
+++ b/implementation.js	Tue Nov 08 08:56:11 2011 -0700
@@ -97,6 +97,10 @@
 	return ancestors;
 }
 
+function getInclusiveAncestors(node) {
+	return getAncestors(node).concat(node);
+}
+
 function getDescendants(node) {
 	var descendants = [];
 	var stop = nextNodeDescendants(node);
@@ -107,6 +111,10 @@
 	return descendants;
 }
 
+function getInclusiveDescendants(node) {
+	return [node].concat(getDescendants(node));
+}
+
 function convertProperty(property) {
 	// Special-case for now
 	var map = {
@@ -4906,6 +4914,46 @@
 		}
 	}
 
+	// "Let ancestor be start block."
+	var ancestor = startBlock;
+
+	// "While ancestor has an inclusive ancestor ol in the same editing host
+	// whose nextSibling is also an ol in the same editing host, or an
+	// inclusive ancestor ul in the same editing host whose nextSibling is also
+	// a ul in the same editing host:"
+	while (getInclusiveAncestors(ancestor).some(function(node) {
+		return inSameEditingHost(ancestor, node)
+			&& (
+				(isHtmlElement(node, "ol") && isHtmlElement(node.nextSibling, "ol"))
+				|| (isHtmlElement(node, "ul") && isHtmlElement(node.nextSibling, "ul"))
+			) && inSameEditingHost(ancestor, node.nextSibling);
+	})) {
+		// "While ancestor and its nextSibling are not both ols in the same
+		// editing host, and are also not both uls in the same editing host,
+		// set ancestor to its parent."
+		while (!(
+			isHtmlElement(ancestor, "ol")
+			&& isHtmlElement(ancestor.nextSibling, "ol")
+			&& inSameEditingHost(ancestor, ancestor.nextSibling)
+		) && !(
+			isHtmlElement(ancestor, "ul")
+			&& isHtmlElement(ancestor.nextSibling, "ul")
+			&& inSameEditingHost(ancestor, ancestor.nextSibling)
+		)) {
+			ancestor = ancestor.parentNode;
+		}
+
+		// "While ancestor's nextSibling has children, append ancestor's
+		// nextSibling's firstChild as the last child of ancestor, preserving
+		// ranges."
+		while (ancestor.nextSibling.hasChildNodes()) {
+			movePreservingRanges(ancestor.nextSibling.firstChild, ancestor, -1);
+		}
+
+		// "Remove ancestor's nextSibling from its parent."
+		ancestor.parentNode.removeChild(ancestor.nextSibling);
+	}
+
 	// "Restore the values from values."
 	restoreValues(values);
 
--- a/source.html	Tue Nov 08 07:48:41 2011 -0700
+++ b/source.html	Tue Nov 08 08:56:11 2011 -0700
@@ -5783,6 +5783,31 @@
     <var>parent</var>, then set <var>end block</var> to <var>parent</var>.
   </ol>
 
+  <li class=note><p>We might have deleted the contents between two lists, in
+  which case we should merge them.  See <a
+  href=http://www.w3.org/Bugs/Public/show_bug.cgi?id=13976>bug 13976</a>.
+
+  <li>Let <var>ancestor</var> be <var>start block</var>.
+
+  <li>While <var>ancestor</var> has an [[inclusiveancestor]] [[ol]] <span>in
+  the same editing host</span> whose [[nextsibling]] is also an [[ol]] <span>in
+  the same editing host</span>, or an [[inclusiveancestor]] [[ul]] <span>in the
+  same editing host</span> whose [[nextsibling]] is also a [[ul]] <span>in the
+  same editing host</span>:
+
+  <ol>
+    <li>While <var>ancestor</var> and its [[nextsibling]] are not both [[ol]]s
+    <span>in the same editing host</span>, and are also not both [[ul]]s
+    <span>in the same editing host</span>, set <var>ancestor</var> to its
+    [[parent]].
+
+    <li>While <var>ancestor</var>'s [[nextsibling]] has [[children]], append
+    <var>ancestor</var>'s [[nextsibling]]'s [[firstchild]] as the last
+    [[child]] of <var>ancestor</var>, <span>preserving ranges</span>.
+
+    <li>Remove <var>ancestor</var>'s [[nextsibling]] from its [[parent]].
+  </ol>
+
   <li><span>Restore the values</span> from <var>values</var>.
 
   <li>If <var>start block</var> has no [[children]], call
--- a/tests.js	Tue Nov 08 07:48:41 2011 -0700
+++ b/tests.js	Tue Nov 08 08:56:11 2011 -0700
@@ -662,15 +662,33 @@
 		'<quasit style=display:block>fo[o</quasit><quasit style=display:block>b]ar</quasit>',
 
 		// https://bugs.webkit.org/show_bug.cgi?id=35281
-		// Results here are wrong, see:
 		// http://www.w3.org/Bugs/Public/show_bug.cgi?id=13976
-		'!<ol><li>foo</li></ol>{}<br><ol><li>bar</li></ol>',
-		'!<ol id=a><li>foo</li></ol>{}<br><ol><li>bar</li></ol>',
-		'!<ol><li>foo</li></ol>{}<br><ol id=b><li>bar</li></ol>',
-		'!<ol id=a><li>foo</li></ol>{}<br><ol id=b><li>bar</li></ol>',
-		'!<ol class=a><li>foo</li></ol>{}<br><ol class=b><li>bar</li></ol>',
+		'<ol><li>foo</ol>{}<br><ol><li>bar</ol>',
+		'<ol><li>foo</ol><p>{}<br></p><ol><li>bar</ol>',
+		'<ol><li><p>foo</ol><p>{}<br></p><ol><li>bar</ol>',
+		'<ol id=a><li>foo</ol>{}<br><ol><li>bar</ol>',
+		'<ol><li>foo</ol>{}<br><ol id=b><li>bar</ol>',
+		'<ol id=a><li>foo</ol>{}<br><ol id=b><li>bar</ol>',
+		'<ol class=a><li>foo</ol>{}<br><ol class=b><li>bar</ol>',
+		// Broken test: http://www.w3.org/Bugs/Public/show_bug.cgi?id=14727
 		'!<ol><ol><li>foo</ol><li>{}<br><ol><li>bar</ol></ol>',
-		'!<ol><ol><li>foo</ol><li>{}<br></li><ol><li>bar</ol></ol>',
+		'<ol><ol><li>foo</ol><li>{}<br></li><ol><li>bar</ol></ol>',
+		'<ol><li>foo[</ol>bar]<ol><li>baz</ol>',
+		'<ol><li>foo[</ol><p>bar]<ol><li>baz</ol>',
+		'<ol><li><p>foo[</ol><p>bar]<ol><li>baz</ol>',
+		'<ol><li>foo[]</ol><ol><li>bar</ol>',
+		'<ol><li>foo</ol>[bar<ol><li>]baz</ol>',
+		'<ol><li>foo</ol><p>[bar<ol><li>]baz</ol>',
+		'<ol><li>foo</ol><p>[bar<ol><li><p>]baz</ol>',
+		'<ol><li>foo</ol><ol><li>b[]ar</ol>',
+		'<ol><ol><li>foo[</ol><li>bar</ol>baz]<ol><li>quz</ol>',
+		'<ul><li>foo</ul>{}<br><ul><li>bar</ul>',
+		'<ul><li>foo</ul><p>{}<br></p><ul><li>bar</ul>',
+		'<ol><li>foo[<li>bar]</ol><ol><li>baz</ol><ol><li>quz</ol>',
+		'<ol><li>foo</ol>{}<br><ul><li>bar</ul>',
+		'<ol><li>foo</ol><p>{}<br></p><ul><li>bar</ul>',
+		'<ul><li>foo</ul>{}<br><ol><li>bar</ol>',
+		'<ul><li>foo</ul><p>{}<br></p><ol><li>bar</ol>',
 	],
 	//@}
 	fontname: [
@@ -1571,6 +1589,34 @@
 		'<dl><dt>foo[<dd>]bar</dl>',
 		'<dl><dt>foo[<dt>]bar<dd>baz</dl>',
 		'<dl><dt>foo<dd>bar[<dd>]baz</dl>',
+
+		// https://bugs.webkit.org/show_bug.cgi?id=35281
+		// http://www.w3.org/Bugs/Public/show_bug.cgi?id=13976
+		'<ol><li>foo</ol>{}<br><ol><li>bar</ol>',
+		'<ol><li>foo</ol><p>{}<br></p><ol><li>bar</ol>',
+		'<ol><li><p>foo</ol><p>{}<br></p><ol><li>bar</ol>',
+		'<ol id=a><li>foo</ol>{}<br><ol><li>bar</ol>',
+		'<ol><li>foo</ol>{}<br><ol id=b><li>bar</ol>',
+		'<ol id=a><li>foo</ol>{}<br><ol id=b><li>bar</ol>',
+		'<ol class=a><li>foo</ol>{}<br><ol class=b><li>bar</ol>',
+		'<ol><ol><li>foo</ol><li>{}<br><ol><li>bar</ol></ol>',
+		'<ol><ol><li>foo</ol><li>{}<br></li><ol><li>bar</ol></ol>',
+		'<ol><li>foo[</ol>bar]<ol><li>baz</ol>',
+		'<ol><li>foo[</ol><p>bar]<ol><li>baz</ol>',
+		'<ol><li><p>foo[</ol><p>bar]<ol><li>baz</ol>',
+		'<ol><li>fo[]o</ol><ol><li>bar</ol>',
+		'<ol><li>foo</ol>[bar<ol><li>]baz</ol>',
+		'<ol><li>foo</ol><p>[bar<ol><li>]baz</ol>',
+		'<ol><li>foo</ol><p>[bar<ol><li><p>]baz</ol>',
+		'<ol><li>foo</ol><ol><li>[]bar</ol>',
+		'<ol><ol><li>foo[</ol><li>bar</ol>baz]<ol><li>quz</ol>',
+		'<ul><li>foo</ul>{}<br><ul><li>bar</ul>',
+		'<ul><li>foo</ul><p>{}<br></p><ul><li>bar</ul>',
+		'<ol><li>foo[<li>bar]</ol><ol><li>baz</ol><ol><li>quz</ol>',
+		'<ol><li>foo</ol>{}<br><ul><li>bar</ul>',
+		'<ol><li>foo</ol><p>{}<br></p><ul><li>bar</ul>',
+		'<ul><li>foo</ul>{}<br><ol><li>bar</ol>',
+		'<ul><li>foo</ul><p>{}<br></p><ol><li>bar</ol>',
 	],
 	//@}
 	hilitecolor: [