Add a couple more tests and update a comment
authorAryeh Gregor <AryehGregor+gitcommit@gmail.com>
Mon, 06 Jun 2011 15:08:36 -0600
changeset 234 28b09cd8c691
parent 233 3fb7f026ad4c
child 235 a2e02a210ef7
Add a couple more tests and update a comment
autoimplementation.html
editcommands.html
source.html
--- a/autoimplementation.html	Mon Jun 06 15:02:25 2011 -0600
+++ b/autoimplementation.html	Mon Jun 06 15:08:36 2011 -0600
@@ -374,6 +374,9 @@
 		'<p>foo<ol><li>bar<li>ba[z</ol><p>q]uz',
 		'<p>fo[o<ol><li>bar<li>b]az</ol><p>quz',
 		'<p>fo[o<ol><li>bar<li>baz</ol><p>q]uz',
+
+		'<ol><li>fo[o</ol><ol><li>b]ar</ol>',
+		'<ol><li>fo[o</ol><ul><li>b]ar</ul>',
 	],
 	fontname: [
 		'foo[]bar',
--- a/editcommands.html	Mon Jun 06 15:02:25 2011 -0600
+++ b/editcommands.html	Mon Jun 06 15:08:36 2011 -0600
@@ -1079,8 +1079,10 @@
   If span isn't an allowed child, it's probably something unpleasant like a
   table row or a list or such.  We don't want to merge to or from something
   like that, because we'd most likely wind up with the wrong type of child
-  somewhere.  Although we probably want to allow merging different lists or
-  such this way . . .
+  somewhere.  It should be pretty hard for this to happen given the
+  normalization we do on the selection; I'm not actually sure how it could
+  happen at all, actually, unless you start out with a DOM that has non-allowed
+  children someplace.  So it's basically a sanity check.
 
   We don't let either start block or end block be a td or th.  This means we'll
   never merge to or from a td or th.  This matches Firefox 5.0a2, and
--- a/source.html	Mon Jun 06 15:02:25 2011 -0600
+++ b/source.html	Mon Jun 06 15:08:36 2011 -0600
@@ -1040,8 +1040,10 @@
   If span isn't an allowed child, it's probably something unpleasant like a
   table row or a list or such.  We don't want to merge to or from something
   like that, because we'd most likely wind up with the wrong type of child
-  somewhere.  Although we probably want to allow merging different lists or
-  such this way . . .
+  somewhere.  It should be pretty hard for this to happen given the
+  normalization we do on the selection; I'm not actually sure how it could
+  happen at all, actually, unless you start out with a DOM that has non-allowed
+  children someplace.  So it's basically a sanity check.
 
   We don't let either start block or end block be a td or th.  This means we'll
   never merge to or from a td or th.  This matches Firefox 5.0a2, and