From fc520e3cedbcdd86eb2b80e94cce78f98af717cf Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Mon, 6 Feb 2017 03:44:58 +0000 Subject: The .Nm macro does not only use the default name when it has no argument, but also when the first argument is a child macro. Arcane issue found in the FreeBSD cxgbetool(8) manual that Baptiste Daroussin sent me long ago for a different reason. While solving this, switch to the new technique of doing text production in the validator, reducing code duplication in the formatters, which also makes -Ttree output clearer. --- mdoc_term.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'mdoc_term.c') diff --git a/mdoc_term.c b/mdoc_term.c index ecac6a66..dc17de54 100644 --- a/mdoc_term.c +++ b/mdoc_term.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_term.c,v 1.342 2017/02/04 11:58:09 schwarze Exp $ */ +/* $Id: mdoc_term.c,v 1.343 2017/02/06 03:44:58 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010, 2012-2017 Ingo Schwarze @@ -996,7 +996,7 @@ termp_nm_pre(DECL_ARGS) return 1; } - if (NULL == n->child && NULL == meta->name) + if (n->child == NULL) return 0; if (n->type == ROFFT_HEAD) @@ -1020,8 +1020,6 @@ termp_nm_pre(DECL_ARGS) } term_fontpush(p, TERMFONT_BOLD); - if (NULL == n->child) - term_word(p, meta->name); return 1; } -- cgit v1.2.3