NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/49481: groff -mandoc terminates output if reference contains the word No



>Number:         49481
>Category:       bin
>Synopsis:       groff -mandoc terminates output if reference contains the word No
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Dec 16 15:30:00 +0000 2014
>Originator:     Antti Kantee
>Release:        
>Organization:
>Environment:
>Description:
In case a reference in a mandoc (i.e. something between .Rs/.Re) contains the word No, groff punts.

That is, unless, logically, No is in quotation marks, except in the case that the entire string is just "No".

So for example the following is fine:

.%A "Dr. No"

while the following fail:

.%A Dr. No

and

.%T "No"

While this behaviour might be documented somewhere, it is against POLA, at least in my opinion.
>How-To-Repeat:
pooka@watou:~$ cat test.man
.Dd 1234
.Sh NAME
.Nm testpage
.Os
.Sh DESC
.Rs
.%A works
.%T Yes
.Re
.Pp
.Rs
.%A fails
.%T No
.Re
.Pp
no output
pooka@watou:~$ groff -Tascii -mandoc test.man
test.man:14: cannot chop empty macro
test.man:14: cannot chop empty macro
troff: automatically ending diversion `reference-title-name' on exit
troff: automatically ending diversion `reference-title-name-for-book' on exit
UNTITLED                             LOCAL                            UNTITLED

NAME
     testpage

DESC
     works, Yes.

pooka@watou:~$ 


Notice how not even the footer is produced.
>Fix:



Home | Main Index | Thread Index | Old Index