From 637b922ab2b2aa18419a0abed18ae9d2fed4e50a Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Wed, 8 Apr 2020 11:56:03 +0000 Subject: Use a separate node->tag attribute rather than abusing the node->string attribute for the purpose. No functional change intended. The purpose is to make it possible to later attach tags to text nodes. --- term_tag.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'term_tag.c') 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 * @@ -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\\"); -- cgit v1.2.3