From 72c819a6c7e10836f9ff67f662ac183fd01f5873 Mon Sep 17 00:00:00 2001 From: facelessuser Date: Sat, 18 Oct 2014 13:17:53 -0600 Subject: Fix tail out of order 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. --- tests/misc/nested-patterns.html | 3 ++- tests/misc/nested-patterns.txt | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'tests/misc') diff --git a/tests/misc/nested-patterns.html b/tests/misc/nested-patterns.html index 1ac98ee..8c46a58 100644 --- a/tests/misc/nested-patterns.html +++ b/tests/misc/nested-patterns.html @@ -4,4 +4,5 @@ link link link -link

\ No newline at end of file +link

+

I am italic and bold I am just bold

\ No newline at end of file diff --git a/tests/misc/nested-patterns.txt b/tests/misc/nested-patterns.txt index c651b86..e347ccf 100644 --- a/tests/misc/nested-patterns.txt +++ b/tests/misc/nested-patterns.txt @@ -5,3 +5,5 @@ __[_link_](http://example.com)__ __[*link*](http://example.com)__ **[_link_](http://example.com)** [***link***](http://example.com) + +***I am ___italic_ and__ bold* I am `just` bold** -- cgit v1.2.3