document: Additional preview flags for FT_LIST
This commit is contained in:
parent
99946f6adf
commit
31b30da462
2 changed files with 7 additions and 2 deletions
|
@ -2873,10 +2873,13 @@ static size_t parse_list(hoedown_document *doc, void *target, const uint8_t *dat
|
|||
|
||||
|
||||
// 2. Parse / render list items
|
||||
hoedown_preview_flags flags = (!is_loose) ? HOEDOWN_PF_LIST_TIGHT : 0;
|
||||
hoedown_preview_flags flags = 0;
|
||||
if (current_mode == NORMAL_PARSING) {
|
||||
if (!is_loose) flags |= HOEDOWN_PF_LIST_TIGHT;
|
||||
if (is_ordered) flags |= HOEDOWN_PF_LIST_ORDERED;
|
||||
set_buffer_data(&doc->data.src[0], data, start, i);
|
||||
content = doc->rndr.object_get(0, HOEDOWN_FT_LIST, flags, target, &doc->data);
|
||||
flags |= HOEDOWN_PF_LIST_ITEM;
|
||||
}
|
||||
|
||||
size_t s, source_start = 0, work_start = 0;
|
||||
|
|
|
@ -170,7 +170,9 @@ extern "C" {
|
|||
typedef enum hoedown_preview_flags {
|
||||
HOEDOWN_PF_ATX_HEADER_LEVEL_MASK = (1 << 3) - 1,
|
||||
HOEDOWN_PF_SETEXT_HEADER_DOUBLE = 1 << 0,
|
||||
HOEDOWN_PF_LIST_TIGHT = 1 << 0,
|
||||
HOEDOWN_PF_LIST_ITEM = 1 << 0,
|
||||
HOEDOWN_PF_LIST_TIGHT = 1 << 1,
|
||||
HOEDOWN_PF_LIST_ORDERED = 1 << 2,
|
||||
HOEDOWN_PF_LINK_IMAGE = 1 << 0,
|
||||
} hoedown_preview_flags;
|
||||
|
||||
|
|
Loading…
Reference in a new issue