diff options
author | John MacFarlane <jgm@berkeley.edu> | 2014-10-18 22:10:23 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2014-10-18 22:10:23 -0700 |
commit | db7434f4b164738a3a3fde15b0c610053c9f3a5f (patch) | |
tree | 46316864ed335579ee0079652cb05a2aa0590c93 /src/inlines.c | |
parent | a50384fac90f89165fd3120b2e5fec39ca4b8ff7 (diff) |
Fixed performance regression.
See discussion under #157.
Diffstat (limited to 'src/inlines.c')
-rw-r--r-- | src/inlines.c | 12 |
1 files changed, 3 insertions, 9 deletions
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; } |