From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailout.scc.kit.edu (mailout.scc.kit.edu [129.13.185.202]) by krisdoz.my.domain (8.14.5/8.14.5) with ESMTP id r8MNgAa2009660 for ; Sun, 22 Sep 2013 19:42:11 -0400 (EDT) Received: from hekate.usta.de (asta-nat.asta.uni-karlsruhe.de [172.22.63.82]) by scc-mailout-02.scc.kit.edu with esmtp (Exim 4.72 #1) id 1VNtI1-0003SQ-5A; Mon, 23 Sep 2013 01:42:09 +0200 Received: from donnerwolke.usta.de ([172.24.96.3]) by hekate.usta.de with esmtp (Exim 4.77) (envelope-from ) id 1VNtI1-0007Yr-2t; Mon, 23 Sep 2013 01:42:09 +0200 Received: from iris.usta.de ([172.24.96.5] helo=usta.de) by donnerwolke.usta.de with esmtp (Exim 4.72) (envelope-from ) id 1VNtI1-0004D1-16; Mon, 23 Sep 2013 01:42:09 +0200 Received: from schwarze by usta.de with local (Exim 4.77) (envelope-from ) id 1VNtI0-0000oD-Ol; Mon, 23 Sep 2013 01:42:08 +0200 Date: Mon, 23 Sep 2013 01:42:08 +0200 From: Ingo Schwarze To: discuss@mdocml.bsd.lv Cc: "Anthony J. Bentley" Subject: Re: Text embedded in Bl Message-ID: <20130922234208.GA15229@iris.usta.de> References: <1490.1379889201@cathet.us> X-Mailinglist: mdocml-discuss Reply-To: discuss@mdocml.bsd.lv MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1490.1379889201@cathet.us> User-Agent: Mutt/1.5.21 (2010-09-15) Hi Anthony, Anthony J. Bentley wrote on Sun, Sep 22, 2013 at 04:33:21PM -0600: > Consider the following, based on an example from gnugk(1): I saw the commit message on ports-changes@ and thought, "ugh, this looks fishy, i should probably look into it" but wasn't sure to find the time. Thank you for looking so carefully into mandoc matters. This is really helpful. > .Bl -tag -width Ds > This is an opening paragraph. > .It Fl a > Perform behavior foo. > ... > .El > > Mandoc refuses to display the page: > FATAL: child violates parent syntax Oh dear. Right, that crash is still in the code. Now that you talk about it, i see that it's not even listed as a bug. That one went right to the top of the TODO list, i consider it the worst bug currently known, as it's a needless crash. > Groff, on the other hand, displays it (I'm not sure of the specifics, > but my guess is it treats the first part as a Pp): > > This is an opening paragraph. > > -a Perform behavior foo. > > To me, this is obviously wrong. To realize why, just think of the case > where you want two paragraphs. (Or the case where the Bl only contains a > single paragraph with no items--which also appeared in this manpage!) > Based on this reasoning, I sent a fixed manpage to upstream, who committed > it. Yes, sure it's a syntax error, and sure it should be fixed upstream, thank you for having upstream fix the mdoc(7) syntax error. > But now I wonder. Should mandoc mimic groff here? I think no, > but maybe someone else will have a different opinion. Of course it should. The aim is that mandoc be bug-compatible with groff. Well, unless it is terribly difficult to implement, or clobbers the code with a ton of spaghetti, or groff is so blatantly broken that i prefer to go and fix groff. But the case at hand, what groff does is quite reasonable: When the markup makes no sense whatsoever, just show the text without the markup. In any case, mandoc mustn't crash, but keep going. Yours, Ingo ----- 8< ----- schnipp ----- >8 ----- 8< ----- schnapp ----- >8 ----- Date: Sun, 22 Sep 2013 19:21:23 -0400 (EDT) From: schwarze@mdocml.bsd.lv To: source@mdocml.bsd.lv Subject: mdocml: Throwing FATAL MANDOCERR_SYNTCHILD on non-.It children of .Bl Log Message: ----------- Throwing FATAL MANDOCERR_SYNTCHILD on non-.It children of .Bl feels so 2008-ish, one of the last remnants of the Kristaps-doesnt-like-syntax-errors-so-lets-just-give-up--Era. Modified Files: -------------- mdocml: TODO Revision Data ------------- Index: TODO =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/TODO,v retrieving revision 1.155 retrieving revision 1.156 diff -LTODO -LTODO -u -p -r1.155 -r1.156 --- TODO +++ TODO @@ -7,7 +7,13 @@ * crashes ************************************************************************ -None known right now. +- .Bl -tag followed by a text node preceding the first .It should not + throw a FATAL error, but only a normal ERROR. Putting this into the + HEAD of an implicit .It might be cleanest, inserting an implicit .Pp + or just dumping the orphan stuff directly into the BODY of the .Bl + might be easier to implement, and all options can no doubt be made + to yield correct (i.e. groff bug-compatible) rendering. + Anthony J. Bentley on discuss@ Sun, 22 Sep 2013 16:33:21 -0600 ************************************************************************ * missing features -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv -- To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv