summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2019-07-23 17:42:15 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2019-07-23 17:42:15 +0000
commitb6793854ab544ab1beea04a9256f17b396bade3f (patch)
treed38f7e9fd85e191d578f5a94bffb005d23334d3c /usr.bin/mandoc
parent5112f6f8e4084772e2599576d2a5cac574abc270 (diff)
tagging support for .TP and .TQ; try e.g. man -O tag=commit cvs
Diffstat (limited to 'usr.bin/mandoc')
-rw-r--r--usr.bin/mandoc/man_term.c14
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;