diff options
Diffstat (limited to 'usr.bin/mandoc')
-rw-r--r-- | usr.bin/mandoc/man_term.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/usr.bin/mandoc/man_term.c b/usr.bin/mandoc/man_term.c index d39326adab8..6960f140850 100644 --- a/usr.bin/mandoc/man_term.c +++ b/usr.bin/mandoc/man_term.c @@ -1,4 +1,4 @@ -/* $OpenBSD: man_term.c,v 1.184 2019/07/22 03:20:55 schwarze Exp $ */ +/* $OpenBSD: man_term.c,v 1.185 2019/07/23 17:42:14 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010-2015, 2017-2019 Ingo Schwarze <schwarze@openbsd.org> @@ -619,6 +619,18 @@ pre_TP(DECL_ARGS) while (nn != NULL && (nn->flags & NODE_LINE) == 0) nn = nn->next; + if (nn == NULL) + return 0; + + if (nn->type == ROFFT_TEXT) + tag_man(p, nn); + else if (nn->child != NULL && + nn->child->type == ROFFT_TEXT && + (nn->tok == MAN_B || nn->tok == MAN_BI || + nn->tok == MAN_BR || nn->tok == MAN_I || + nn->tok == MAN_IB || nn->tok == MAN_IR)) + tag_man(p, nn->child); + while (nn != NULL) { print_man_node(p, mt, nn, meta); nn = nn->next; |