waylan/Python-Markdown — pull request #356 by facelessuser (2014-10-17 15:51:40+00:00)
Title: Fix out of order tail issue

While experimenting, I stumbled on a issue where tails get inserted out of order if put under the right stress.

Test (the case below is absurd, but I had to recreate the issue without the extension I was testing):
```
This should remain in order:

***I am ___italic_ and__ bold* I am `just` bold**
```

Expected compared against actual:
```diff
--- right.html	Fri Oct 17 09:28:35 2014
+++ wrong.html	Fri Oct 17 09:28:26 2014
@@ -1,2 +1,2 @@

This should remain in order:

-

I am italic and bold I am just bold

+

just boldI am italic and bold I am

```

The fix was very straight forward. Tails of subnodes, when inserted back into the parent, should be inserted after the subnode.