bug-groff
[Top][All Lists]
Advanced

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

[bug #62774] [mdoc] cope with degenerate documents (`Dd`, `Dt`, `Os` not


From: G. Branden Robinson
Subject: [bug #62774] [mdoc] cope with degenerate documents (`Dd`, `Dt`, `Os` not called)
Date: Sun, 11 Sep 2022 08:09:58 -0400 (EDT)

Follow-up Comment #3, bug #62774 (project groff):

I should add there's no regression relative to groff 1.22.4.  Ingo terms every
change in output from his test suite for _mandoc_ as a "regression", which I
find overbroad and unhelpful.

groff 1.22.4 indeed behaved badly with degenerate input.  Here's an exhibit.



$ cat EXPERIMENTS/degenerate.man 
.Dd
.Dt
.Os
.Dd Today
.Dt foo 1
.Os Hurd
.Sh Name
.Nm gasguzzler
.Dd Tomorrow
.Dt bar 3
.Os
$ groff --version | head -n 1
GNU groff version 1.22.4
$ groff -Tascii -mdoc EXPERIMENTS/degenerate.man | cat -s
mdoc warning: Empty input line #34

Name
     gasguzzler



The foregoing input also badly confused continuous rendering mode, spraying
many blank lines to the terminal, hence the "cat -s".


$ groff -Tascii -mdoc EXPERIMENTS/degenerate.man | wc -l
mdoc warning: Empty input line #34
66


With the changes I'm about to push, we have the following instead.


$ ./build/test-groff -b -ww -Tascii -mdoc EXPERIMENTS/degenerate.man
mdoc warning: .Dd directive expects an argument (#1)
mdoc warning: .Dt directive expects one or more arguments (#2)
UNTITLED                             LOCAL                           
UNTITLED

GNU                                 UNDATED                          
UNTITLED
-------------------------------------------------------------------------------
foo(1)                      General Commands Manual                    
foo(1)

Name
     gasguzzler

Hurd                                 Today                             
foo(1)
-------------------------------------------------------------------------------
bar(3)                      Library Functions Manual                   
bar(3)

GNU                                Tomorrow                            
bar(3)


Note that the mail gateway or an MUA may corrupt the long, whitespace-heavy
lines above.  The headers and footers are one line each.

I can't speak for Ingo, but this looks like progress to me.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?62774>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]