summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;