Skip to content

Conversation

facelessuser
Copy link
Collaborator

This is a rework of #356.

This issue was discovered when dealing with nested inlines. In
treeprocessors.py it was incorrectly handling tails. In short, tail
elements were being inserted earlier than they were supposed to be.

In order to fix this, the insertion index should be incremented by 1 so
that when the tails are inserted into the parent, they will be just
after the child they came from.

Also added a test in nested-patterns to catch this issue.

This issue was discovered when dealing with nested inlines.  In
treeprocessors.py it was incorrectly handling tails.  In short, tail
elements were being inserted earlier than they were supposed to be.

In order to fix this, the insertion index should be incremented by 1 so
that when the tails are inserted into the parent, they will be just
after the child they came from.

Also added a test in nested-patterns to catch this issue.
@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 72c819a on facelessuser:master into 57633f1 on waylan:master.

waylan added a commit that referenced this pull request Oct 19, 2014
Fix tail out of order issue
@waylan waylan merged commit 5e46c06 into Python-Markdown:master Oct 19, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants