From e0e303760d9c53bc1d18fa5b1e82ad7a15422677 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Tue, 2 Aug 2022 12:02:28 +0000 Subject: If the body of a man(7) .MT or .UR block is empty, do not emit a warning. Leaving the body empty is legitimate in this case if the author only wants to display a mail address or URI without providing a link text. Output modules already handle this correctly: terminal output shows just the URI without an accompanying text, HTML output uses the URI for *both* the href= attribute and as the content of the element. The documentation was also wrong and claimed that an .MT or .UR block with an empty body would produce no output. As explained above, this isn't true. Bogus warning reported by Alejandro Colomar . --- man_validate.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'man_validate.c') diff --git a/man_validate.c b/man_validate.c index bc250a90..1f3c0159 100644 --- a/man_validate.c +++ b/man_validate.c @@ -373,13 +373,11 @@ post_UR(CHKARGS) if (n->type == ROFFT_HEAD && n->child == NULL) mandoc_msg(MANDOCERR_UR_NOHEAD, n->line, n->pos, "%s", roff_name[n->tok]); - check_part(man, n); } static void check_part(CHKARGS) { - if (n->type == ROFFT_BODY && n->child == NULL) mandoc_msg(MANDOCERR_BLK_EMPTY, n->line, n->pos, "%s", roff_name[n->tok]); -- cgit