- Commit
- b2306ee0551cb4d319046e63aa96ee5a4062ae47
- Parent
- 6ecd359a195d3dce3c093cc955936e4ed954b48d
- Author
- John MacFarlane <jgm@berkeley.edu>
- Date
latex: Removed need to access render->in_tight_list_item.
Also removed unneeded function.
My personal build of CMark ✏️
latex: Removed need to access render->in_tight_list_item.
Also removed unneeded function.
1 file changed, 0 insertions, 29 deletions
Status | File Name | N° Changes | Insertions | Deletions |
Modified | src/latex.c | 29 | 0 | 29 |
diff --git a/src/latex.c b/src/latex.c @@ -242,24 +242,10 @@ get_link_type(cmark_node *node) } } -// if node is a block node, returns node. -// otherwise returns first block-level node that is an ancestor of node. -static cmark_node* -get_containing_block(cmark_node *node) -{ - while (node && - (node->type < CMARK_NODE_FIRST_BLOCK || - node->type > CMARK_NODE_LAST_BLOCK)) { - node = node->parent; - } - return node; -} - static int S_render_node(cmark_node *node, cmark_event_type ev_type, cmark_renderer *renderer) { - cmark_node *tmp; int list_number; char list_number_string[20]; bool entering = (ev_type == CMARK_EVENT_ENTER); @@ -268,21 +254,6 @@ S_render_node(cmark_node *node, cmark_event_type ev_type, "vi", "vii", "viii", "ix", "x" }; - // Don't adjust tight list status til we've started the list. - // Otherwise we loose the blank line between a paragraph and - // a following list. - if (!(node->type == CMARK_NODE_ITEM && node->prev == NULL && - entering)) { - tmp = get_containing_block(node); - renderer->in_tight_list_item = - (tmp->type == CMARK_NODE_ITEM && - cmark_node_get_list_tight(tmp->parent)) || - (tmp && - tmp->parent && - tmp->parent->type == CMARK_NODE_ITEM && - cmark_node_get_list_tight(tmp->parent->parent)); - } - switch (node->type) { case CMARK_NODE_DOCUMENT: break;