summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2019-07-23 17:42:14 +0000
committerschwarze <schwarze@openbsd.org>2019-07-23 17:42:14 +0000
commit30e481c64dfae6e326e472e336bb8690e72bcd00 (patch)
tree7fd6634c6f194ff1e926de2164232ad5e63af1d6
parentUse the correct prefix size when writing out AID_VPN_IPv4 and AID_VPN_IPv6 (diff)
downloadwireguard-openbsd-30e481c64dfae6e326e472e336bb8690e72bcd00.tar.xz
wireguard-openbsd-30e481c64dfae6e326e472e336bb8690e72bcd00.zip
tagging support for .TP and .TQ; try e.g. man -O tag=commit cvs
-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;