diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2022-08-02 11:55:52 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2022-08-02 11:55:52 +0000 |
commit | f8366bb905de7a6e5174bfe6813d2635d3b7469a (patch) | |
tree | a8a4db9439891d4dbc09beebf5a561e50a799c88 /usr.bin/mandoc/mandoc.1 | |
parent | 4744f78fbcd877d7e89b0a2a599ffb6d0efe68d1 (diff) |
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 <a> 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 <alx dot manpages at gmail dot com>.
Diffstat (limited to 'usr.bin/mandoc/mandoc.1')
-rw-r--r-- | usr.bin/mandoc/mandoc.1 | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/usr.bin/mandoc/mandoc.1 b/usr.bin/mandoc/mandoc.1 index 1880c30636c..931370665f6 100644 --- a/usr.bin/mandoc/mandoc.1 +++ b/usr.bin/mandoc/mandoc.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: mandoc.1,v 1.188 2022/06/28 04:36:29 jsg Exp $ +.\" $OpenBSD: mandoc.1,v 1.189 2022/08/02 11:55:51 schwarze Exp $ .\" .\" Copyright (c) 2012, 2014-2022 Ingo Schwarze <schwarze@openbsd.org> .\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> @@ -15,7 +15,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: June 28 2022 $ +.Dd $Mdocdate: August 2 2022 $ .Dt MANDOC 1 .Os .Sh NAME @@ -1473,10 +1473,8 @@ A .Ic \&Bl , .Ic \&D1 , .Ic \&Dl , -.Ic \&MT , -.Ic \&RS , or -.Ic \&UR +.Ic \&RS block contains nothing in its body and will produce no output. .It Sy "empty argument, using 0n" .Pq mdoc |