=================================================================== RCS file: /cvs/mandoc/mdoc_term.c,v retrieving revision 1.120 retrieving revision 1.122 diff -u -p -r1.120 -r1.122 --- mandoc/mdoc_term.c 2010/05/10 08:05:17 1.120 +++ mandoc/mdoc_term.c 2010/05/13 06:22:11 1.122 @@ -1,4 +1,4 @@ -/* $Id: mdoc_term.c,v 1.120 2010/05/10 08:05:17 kristaps Exp $ */ +/* $Id: mdoc_term.c,v 1.122 2010/05/13 06:22:11 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -337,6 +337,9 @@ print_mdoc_node(DECL_ARGS) if (termacts[n->tok].post) (*termacts[n->tok].post)(p, &npair, m, n); + if (MDOC_EOS & n->flags) + p->flags |= TERMP_SENTENCE; + p->offset = offset; p->rmargin = rmargin; } @@ -1082,7 +1085,7 @@ static int termp_nm_pre(DECL_ARGS) { - if (SEC_SYNOPSIS == n->sec) + if (SEC_SYNOPSIS == n->sec && MDOC_LINE & n->flags) term_newln(p); term_fontpush(p, TERMFONT_BOLD); @@ -1381,7 +1384,7 @@ static void termp_fd_post(DECL_ARGS) { - if (n->sec != SEC_SYNOPSIS) + if (n->sec != SEC_SYNOPSIS || ! (MDOC_LINE & n->flags)) return; term_newln(p); @@ -1468,7 +1471,7 @@ static void termp_lb_post(DECL_ARGS) { - if (SEC_LIBRARY == n->sec) + if (SEC_LIBRARY == n->sec && MDOC_LINE & n->flags) term_newln(p); } @@ -1537,7 +1540,7 @@ static int termp_ft_pre(DECL_ARGS) { - if (SEC_SYNOPSIS == n->sec) + if (SEC_SYNOPSIS == n->sec && MDOC_LINE & n->flags) if (n->prev && MDOC_Fo == n->prev->tok) term_vspace(p); @@ -1551,7 +1554,7 @@ static void termp_ft_post(DECL_ARGS) { - if (SEC_SYNOPSIS == n->sec) + if (SEC_SYNOPSIS == n->sec && MDOC_LINE & n->flags) term_newln(p); } @@ -1592,7 +1595,7 @@ static void termp_fn_post(DECL_ARGS) { - if (n->sec == SEC_SYNOPSIS && n->next) + if (n->sec == SEC_SYNOPSIS && n->next && MDOC_LINE & n->flags) term_vspace(p); } @@ -1891,7 +1894,7 @@ termp_in_post(DECL_ARGS) term_word(p, ">"); term_fontpop(p); - if (SEC_SYNOPSIS != n->sec) + if (SEC_SYNOPSIS != n->sec && ! (MDOC_LINE & n->flags)) return; term_newln(p);