This gist is a note for ticket:12729.
According to: http://www.w3.org/TR/html401/struct/links.html#h-12.2.2
- Set HTML with following selection:
<ul>
<li><a href="#one">one</a></li>
<li><a href="#two">^two</a></li>
</ul>
- Press backspace key.
Actual result:
<ul>
<li><a href="#one">one<a href="#two">two</a></a></li>
</ul>
Above produced nested anchors, which is not desirable.
Expected result:
<ul>
<li><a href="#one">one</a><a href="#two">two</a></li>
</ul>
But what about this situation in general, can we do the same?
From:
<ol>
<li>1<ol><li>1.1</li></ol></li>
<li>^2</li>
</ol>
To (after fix):
<ol>
<li>1<ol><li>1.1</li></ol>2</li>
</ol>
Or (before fix):
<ol>
<li>1<ol><li>1.12</li></ol></li>
</ol>
No, we don't want to handle text after nested list items. So the expected behaviour of your last example is: