=================================================================== RCS file: /cvs/mandoc/mdoc_term.c,v retrieving revision 1.137 retrieving revision 1.138 diff -u -p -r1.137 -r1.138 --- mandoc/mdoc_term.c 2010/06/04 21:05:39 1.137 +++ mandoc/mdoc_term.c 2010/06/04 21:49:39 1.138 @@ -1,4 +1,4 @@ -/* $Id: mdoc_term.c,v 1.137 2010/06/04 21:05:39 kristaps Exp $ */ +/* $Id: mdoc_term.c,v 1.138 2010/06/04 21:49:39 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -1847,11 +1847,15 @@ static int termp_in_pre(DECL_ARGS) { - term_fontpush(p, TERMFONT_BOLD); - if (SEC_SYNOPSIS == n->sec) + if (SEC_SYNOPSIS == n->sec && MDOC_LINE & n->flags) { + term_fontpush(p, TERMFONT_BOLD); term_word(p, "#include"); + term_word(p, "<"); + } else { + term_word(p, "<"); + term_fontpush(p, TERMFONT_UNDER); + } - term_word(p, "<"); p->flags |= TERMP_NOSPACE; return(1); } @@ -1862,23 +1866,16 @@ static void termp_in_post(DECL_ARGS) { - term_fontpush(p, TERMFONT_BOLD); + if (SEC_SYNOPSIS == n->sec && MDOC_LINE & n->flags) + term_fontpush(p, TERMFONT_BOLD); + p->flags |= TERMP_NOSPACE; term_word(p, ">"); - term_fontpop(p); - if (SEC_SYNOPSIS != n->sec || ! (MDOC_LINE & n->flags)) - return; - - term_newln(p); - /* - * XXX Not entirely correct. If `.In foo bar' is specified in - * the SYNOPSIS section, then it produces a single break after - * the ; mandoc asserts a vertical space. Since this - * construction is rarely used, I think it's fine. - */ - if (n->next && MDOC_In != n->next->tok) - term_vspace(p); + if (SEC_SYNOPSIS == n->sec && MDOC_LINE & n->flags) { + term_fontpop(p); + term_newln(p); + } }