From db7434f4b164738a3a3fde15b0c610053c9f3a5f Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 18 Oct 2014 22:10:23 -0700 Subject: Fixed performance regression. See discussion under #157. --- src/inlines.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/inlines.c b/src/inlines.c index 9fa4a7f..b530c02 100644 --- a/src/inlines.c +++ b/src/inlines.c @@ -841,16 +841,10 @@ static int parse_inline(subject* subj, node_inl ** first, node_inl ** last) if (*first == NULL) { *first = new; *last = new; - } else { - append_inlines(*first, new); - } - - if (new) { - while (new->next) { - new = new->next; - } + } else if (new) { + append_inlines(*last, new); + *last = new; } - *last = new; return 1; } -- cgit v1.2.3