=================================================================== RCS file: /cvs/mandoc/mdoc_term.c,v retrieving revision 1.189 retrieving revision 1.191 diff -u -p -r1.189 -r1.191 --- mandoc/mdoc_term.c 2010/09/26 10:00:42 1.189 +++ mandoc/mdoc_term.c 2010/09/27 23:03:44 1.191 @@ -1,4 +1,4 @@ -/* $Id: mdoc_term.c,v 1.189 2010/09/26 10:00:42 kristaps Exp $ */ +/* $Id: mdoc_term.c,v 1.191 2010/09/27 23:03:44 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons * Copyright (c) 2010 Ingo Schwarze @@ -81,7 +81,6 @@ static void termp_lb_post(DECL_ARGS); static void termp_nm_post(DECL_ARGS); static void termp_pf_post(DECL_ARGS); static void termp_quote_post(DECL_ARGS); -static void termp_quote_post(DECL_ARGS); static void termp_sh_post(DECL_ARGS); static void termp_ss_post(DECL_ARGS); @@ -1578,6 +1577,26 @@ termp_bd_pre(DECL_ARGS) for (nn = n->child; nn; nn = nn->next) { print_mdoc_node(p, pair, m, nn); + /* + * If the printed node flushes its own line, then we + * needn't do it here as well. This is hacky, but the + * notion of selective eoln whitespace is pretty dumb + * anyway, so don't sweat it. + */ + switch (nn->tok) { + case (MDOC_br): + /* FALLTHROUGH */ + case (MDOC_sp): + /* FALLTHROUGH */ + case (MDOC_Bl): + /* FALLTHROUGH */ + case (MDOC_Lp): + /* FALLTHROUGH */ + case (MDOC_Pp): + continue; + default: + break; + } if (nn->next && nn->next->line == nn->line) continue; term_flushln(p);