summaryrefslogtreecommitdiff
path: root/src/latex.c
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-07-12 13:54:57 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2015-07-12 13:54:57 -0700
commitb2306ee0551cb4d319046e63aa96ee5a4062ae47 (patch)
treefad17cdab20cfdd8aa82b8de3bda2f4ed78b2cf4 /src/latex.c
parent6ecd359a195d3dce3c093cc955936e4ed954b48d (diff)
latex: Removed need to access render->in_tight_list_item.
Also removed unneeded function.
Diffstat (limited to 'src/latex.c')
-rw-r--r--src/latex.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/src/latex.c b/src/latex.c
index 684c855..70aa920 100644
--- 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;