=================================================================== RCS file: /cvs/mandoc/term_tag.c,v retrieving revision 1.2 retrieving revision 1.4 diff -u -p -r1.2 -r1.4 --- mandoc/term_tag.c 2020/04/02 22:12:55 1.2 +++ mandoc/term_tag.c 2020/04/18 20:40:10 1.4 @@ -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.4 2020/04/18 20:40:10 schwarze Exp $ */ /* * Copyright (c) 2015,2016,2018,2019,2020 Ingo Schwarze * @@ -31,6 +31,7 @@ #include "mandoc.h" #include "roff.h" +#include "roff_int.h" #include "tag.h" #include "term_tag.h" @@ -129,9 +130,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\\");