=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/mdoc_term.c,v retrieving revision 1.265 retrieving revision 1.266 diff -c -r1.265 -r1.266 *** src/usr.bin/mandoc/mdoc_term.c 2018/04/05 09:16:45 1.265 --- src/usr.bin/mandoc/mdoc_term.c 2018/04/11 17:10:35 1.266 *************** *** 1,7 **** ! /* $OpenBSD: mdoc_term.c,v 1.265 2018/04/05 09:16:45 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons ! * Copyright (c) 2010, 2012-2017 Ingo Schwarze * Copyright (c) 2013 Franco Fichtner * * Permission to use, copy, modify, and distribute this software for any --- 1,7 ---- ! /* $OpenBSD: mdoc_term.c,v 1.266 2018/04/11 17:10:35 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons ! * Copyright (c) 2010, 2012-2018 Ingo Schwarze * Copyright (c) 2013 Franco Fichtner * * Permission to use, copy, modify, and distribute this software for any *************** *** 281,287 **** p->defindent = 5; term_begin(p, print_mdoc_head, print_mdoc_foot, &mdoc->meta); ! while (n != NULL && n->flags & NODE_NOPRT) n = n->next; if (n != NULL) { if (n->tok != MDOC_Sh) --- 281,289 ---- p->defindent = 5; term_begin(p, print_mdoc_head, print_mdoc_foot, &mdoc->meta); ! while (n != NULL && ! (n->type == ROFFT_COMMENT || ! n->flags & NODE_NOPRT)) n = n->next; if (n != NULL) { if (n->tok != MDOC_Sh) *************** *** 310,316 **** struct termpair npair; size_t offset, rmargin; ! if (n->flags & NODE_NOPRT) return; chld = 1; --- 312,318 ---- struct termpair npair; size_t offset, rmargin; ! if (n->type == ROFFT_COMMENT || n->flags & NODE_NOPRT) return; chld = 1; *************** *** 565,571 **** /* Do not vspace directly after Ss/Sh. */ nn = n; ! while (nn->prev != NULL && nn->prev->flags & NODE_NOPRT) nn = nn->prev; while (nn->prev == NULL) { do { --- 567,575 ---- /* Do not vspace directly after Ss/Sh. */ nn = n; ! while (nn->prev != NULL && ! (nn->prev->type == ROFFT_COMMENT || ! nn->prev->flags & NODE_NOPRT)) nn = nn->prev; while (nn->prev == NULL) { do { *************** *** 1548,1554 **** case ROFFT_BLOCK: term_newln(p); for (nn = n->prev; nn != NULL; nn = nn->prev) ! if ((nn->flags & NODE_NOPRT) == 0) break; if (nn != NULL) term_vspace(p); --- 1552,1559 ---- case ROFFT_BLOCK: term_newln(p); for (nn = n->prev; nn != NULL; nn = nn->prev) ! if (nn->type != ROFFT_COMMENT && ! (nn->flags & NODE_NOPRT) == 0) break; if (nn != NULL) term_vspace(p);