From 6cbb0c9995882efd2f5fd8039c00272d48eb6393 Mon Sep 17 00:00:00 2001 From: Andre D Date: Mon, 21 Nov 2011 14:43:02 -0500 Subject: [PATCH] Nesting lists of different types works again --- src/markdown.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/markdown.c b/src/markdown.c index e498c28..fda7ada 100644 --- a/src/markdown.c +++ b/src/markdown.c @@ -1623,8 +1623,10 @@ parse_listitem(struct buf *ob, struct sd_markdown *rndr, uint8_t *data, size_t s has_next_oli = prefix_oli(data + beg + i, end - beg - i); /* checking for ul/ol switch */ - if (((*flags & MKD_LIST_ORDERED) && has_next_uli) || - (!(*flags & MKD_LIST_ORDERED) && has_next_oli)) { + if (in_empty && ( + ((*flags & MKD_LIST_ORDERED) && has_next_uli) || + (!(*flags & MKD_LIST_ORDERED) && has_next_oli) + )){ *flags |= MKD_LI_END; break; /* the following item must have same list type */ }