User:Catrope/Unwrap

The conceptually correct way
Initial state: Foo   Bar    Baz

First split: Foo     Bar    Baz

Second split: Foo     Bar      Baz

Unwrapping (note that the removed item tags precede the previously inserted list tags, so the transaction processor's cursor would have to move backwards) Foo     Bar      Baz

Final state: Foo   Bar    Baz

The condensed way, and why it probably won't work
Combined diff of all the changes above: Foo     Bar      Baz Reduced/condensed diff (dropping the list tags that are added and immediately removed again): Foo    Bar     Baz However, the intermediate state would look like this: Foo    Bar     Baz which is invalid, because the second list item is not the child of a list. Most likely, the prepare functions will refuse to construct such a transaction, and the transaction processor will refuse to execute it (and those are good things). Hacking around that for this special case is probably hard and probably a bad idea.