Merge pull request #81 from andre-d/listfix
Nesting lists of different types works again
This commit is contained in:
commit
9f379cc2ab
1 changed files with 4 additions and 2 deletions
|
@ -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 */
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue