=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/mdoc_term.c,v retrieving revision 1.68 retrieving revision 1.69 diff -u -r1.68 -r1.69 --- src/usr.bin/mandoc/mdoc_term.c 2010/01/02 02:42:06 1.68 +++ src/usr.bin/mandoc/mdoc_term.c 2010/02/18 02:11:26 1.69 @@ -1,4 +1,4 @@ -/* $Id: mdoc_term.c,v 1.68 2010/01/02 02:42:06 schwarze Exp $ */ +/* $Id: mdoc_term.c,v 1.69 2010/02/18 02:11:26 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -128,6 +128,7 @@ static int termp_ss_pre(DECL_ARGS); static int termp_under_pre(DECL_ARGS); static int termp_ud_pre(DECL_ARGS); +static int termp_vt_pre(DECL_ARGS); static int termp_xr_pre(DECL_ARGS); static int termp_xx_pre(DECL_ARGS); @@ -171,7 +172,7 @@ { termp_rv_pre, NULL }, /* Rv */ { NULL, NULL }, /* St */ { termp_under_pre, NULL }, /* Va */ - { termp_under_pre, termp_vt_post }, /* Vt */ + { termp_vt_pre, termp_vt_post }, /* Vt */ { termp_xr_pre, NULL }, /* Xr */ { NULL, termp____post }, /* %A */ { termp_under_pre, termp____post }, /* %B */ @@ -1286,12 +1287,27 @@ } +static int +termp_vt_pre(DECL_ARGS) +{ + + if (MDOC_ELEM == n->type) + return(termp_under_pre(p, pair, m, n)); + else if (MDOC_HEAD == n->type) + return(0); + else if (MDOC_BLOCK == n->type) + return(1); + + return(termp_under_pre(p, pair, m, n)); +} + + /* ARGSUSED */ static void termp_vt_post(DECL_ARGS) { - if (n->sec != SEC_SYNOPSIS) + if (MDOC_BLOCK != n->type) return; if (n->next && MDOC_Vt == n->next->tok) term_newln(p);