=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/mdoc_term.c,v retrieving revision 1.278 retrieving revision 1.279 diff -c -r1.278 -r1.279 *** src/usr.bin/mandoc/mdoc_term.c 2020/03/13 00:31:05 1.278 --- src/usr.bin/mandoc/mdoc_term.c 2020/04/06 09:55:49 1.279 *************** *** 1,4 **** ! /* $OpenBSD: mdoc_term.c,v 1.278 2020/03/13 00:31:05 schwarze Exp $ */ /* * Copyright (c) 2010, 2012-2020 Ingo Schwarze * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons --- 1,4 ---- ! /* $OpenBSD: mdoc_term.c,v 1.279 2020/04/06 09:55:49 schwarze Exp $ */ /* * Copyright (c) 2010, 2012-2020 Ingo Schwarze * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons *************** *** 333,339 **** memset(&npair, 0, sizeof(struct termpair)); npair.ppair = pair; ! if (n->flags & NODE_ID) term_tag_write(n, p->line); /* --- 333,340 ---- memset(&npair, 0, sizeof(struct termpair)); npair.ppair = pair; ! if (n->flags & NODE_ID && n->tok != MDOC_Pp && ! (n->tok != MDOC_It || n->type != ROFFT_BLOCK)) term_tag_write(n, p->line); /* *************** *** 628,633 **** --- 629,636 ---- if (n->type == ROFFT_BLOCK) { print_bvspace(p, n->parent->parent, n); + if (n->flags & NODE_ID) + term_tag_write(n, p->line); return 1; } *************** *** 1108,1114 **** static int termp_nd_pre(DECL_ARGS) { - if (n->type == ROFFT_BODY) term_word(p, "\\(en"); return 1; --- 1111,1116 ---- *************** *** 1117,1130 **** static int termp_bl_pre(DECL_ARGS) { ! ! return n->type != ROFFT_HEAD; } static void termp_bl_post(DECL_ARGS) { - if (n->type != ROFFT_BLOCK) return; term_newln(p); --- 1119,1138 ---- static int termp_bl_pre(DECL_ARGS) { ! switch (n->type) { ! case ROFFT_BLOCK: ! term_newln(p); ! return 1; ! case ROFFT_HEAD: ! return 0; ! default: ! return 1; ! } } static void termp_bl_post(DECL_ARGS) { if (n->type != ROFFT_BLOCK) return; term_newln(p); *************** *** 1138,1144 **** static int termp_xr_pre(DECL_ARGS) { - if (NULL == (n = n->child)) return 0; --- 1146,1151 ---- *************** *** 1553,1558 **** --- 1560,1567 ---- termp_pp_pre(DECL_ARGS) { term_vspace(p); + if (n->flags & NODE_ID) + term_tag_write(n, p->line); return 0; }