summaryrefslogtreecommitdiffstats
path: root/man_term.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2019-07-23 17:53:35 +0000
committerIngo Schwarze <schwarze@openbsd.org>2019-07-23 17:53:35 +0000
commit52838f7dbb2f85b9b3c01e2c3762f63743598196 (patch)
tree91ff4d4e2c4b0c93a301c63712b19e2ee6e36826 /man_term.c
parent4fdfa8d931262ec6f10a5b0be980b235796cd3f7 (diff)
downloadmandoc-52838f7dbb2f85b9b3c01e2c3762f63743598196.tar.gz
tagging support for .TP and .TQ; try e.g. man -O tag=commit cvs
Diffstat (limited to 'man_term.c')
-rw-r--r--man_term.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/man_term.c b/man_term.c
index 634db0ac..9ec64768 100644
--- a/man_term.c
+++ b/man_term.c
@@ -621,6 +621,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;