aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/term_tag.c
diff options
context:
space:
mode:
Diffstat (limited to 'term_tag.c')
-rw-r--r--term_tag.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/term_tag.c b/term_tag.c
index f6203a6c..201471c5 100644
--- a/term_tag.c
+++ b/term_tag.c
@@ -1,4 +1,4 @@
-/* $Id: term_tag.c,v 1.2 2020/04/02 22:12:55 schwarze Exp $ */
+/* $Id: term_tag.c,v 1.3 2020/04/08 11:56:04 schwarze Exp $ */
/*
* Copyright (c) 2015,2016,2018,2019,2020 Ingo Schwarze <schwarze@openbsd.org>
*
@@ -129,9 +129,7 @@ term_tag_write(struct roff_node *n, size_t line)
if (tag_files.tfs == NULL)
return;
- if (n->string == NULL)
- n = n->child;
- cp = n->string;
+ cp = n->tag == NULL ? n->child->string : n->tag;
if (cp[0] == '\\' && (cp[1] == '&' || cp[1] == 'e'))
cp += 2;
len = strcspn(cp, " \t\\");