=================================================================== RCS file: /cvs/mandoc/mdoc_html.c,v retrieving revision 1.184 retrieving revision 1.187 diff -u -p -r1.184 -r1.187 --- mandoc/mdoc_html.c 2012/11/17 00:26:33 1.184 +++ mandoc/mdoc_html.c 2014/03/30 19:47:48 1.187 @@ -1,6 +1,7 @@ -/* $Id: mdoc_html.c,v 1.184 2012/11/17 00:26:33 schwarze Exp $ */ +/* $Id: mdoc_html.c,v 1.187 2014/03/30 19:47:48 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons + * Copyright (c) 2014 Ingo Schwarze * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -95,6 +96,7 @@ static int mdoc_it_pre(MDOC_ARGS); static int mdoc_lb_pre(MDOC_ARGS); static int mdoc_li_pre(MDOC_ARGS); static int mdoc_lk_pre(MDOC_ARGS); +static int mdoc_ll_pre(MDOC_ARGS); static int mdoc_mt_pre(MDOC_ARGS); static int mdoc_ms_pre(MDOC_ARGS); static int mdoc_nd_pre(MDOC_ARGS); @@ -242,6 +244,7 @@ static const struct htmlmdoc mdocs[MDOC_MAX] = { {mdoc_sp_pre, NULL}, /* sp */ {mdoc__x_pre, mdoc__x_post}, /* %U */ {NULL, NULL}, /* Ta */ + {mdoc_ll_pre, NULL}, /* ll */ }; static const char * const lists[LIST_MAX] = { @@ -460,14 +463,10 @@ print_mdoc_node(MDOC_ARGS) } if (HTML_KEEP & h->flags) { - if (n->prev && n->prev->line != n->line) { + if (n->prev ? (n->prev->lastline != n->line) : + (n->parent && n->parent->line != n->line)) { h->flags &= ~HTML_KEEP; h->flags |= HTML_PREKEEP; - } else if (NULL == n->prev) { - if (n->parent && n->parent->line != n->line) { - h->flags &= ~HTML_KEEP; - h->flags |= HTML_PREKEEP; - } } } @@ -1603,12 +1602,19 @@ mdoc_sm_pre(MDOC_ARGS) /* ARGSUSED */ static int +mdoc_ll_pre(MDOC_ARGS) +{ + + return(0); +} + +/* ARGSUSED */ +static int mdoc_pp_pre(MDOC_ARGS) { print_otag(h, TAG_P, 0, NULL); return(0); - } /* ARGSUSED */