From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from kerhand.co.uk (_smtpd@82-69-137-214.dsl.in-addr.zen.co.uk [82.69.137.214]) by krisdoz.my.domain (8.14.3/8.14.3) with ESMTP id o8GMRnbd014412 for ; Thu, 16 Sep 2010 18:27:50 -0400 (EDT) Received: from localhost (1000@localhost [IPv6:::1]) by kerhand.co.uk (OpenSMTPD) with ESMTP id whTZnQQr for ; Thu, 16 Sep 2010 23:27:23 +0100 (BST) Date: Thu, 16 Sep 2010 23:27:23 +0100 From: Jason McIntyre To: discuss@mdocml.bsd.lv Subject: Re: WARNING: blocks badly nested: Oc breaks Op Message-ID: <20100916222747.GB30810@bramka.kerhand.co.uk> References: <20100911074624.GC5369@bramka.kerhand.co.uk> <20100916212333.GB5462@usta.de> 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: <20100916212333.GB5462@usta.de> User-Agent: Mutt/1.4.2.3i On Thu, Sep 16, 2010 at 11:23:33PM +0200, Ingo Schwarze wrote: > Hi Jason, > > Jason McIntyre wrote on Sat, Sep 11, 2010 at 08:46:00AM +0100: > > > hi. pfctl(8) contains this snippet: > > > > .Xo > > .Oo Fl t Ar table > > .Fl T Ar command > > .Op Ar address ... Oc > > .Xc > > > > mandoc is not happy about having a ".Op ... Oc" line and warns: > > > > pfctl.8:56:20: WARNING: blocks badly nested: Oc breaks Op > > > > but is that fair? > > Yes, i implemented that warning on purpose, and i consider it fair. > > The scope of the .Op macro is defined to extend to the end of the line. > So, the code cited above > - first opens .Oo > - then opens .Op > - then closes .Oo (breaking .Op) > > In XML, it would look like this: > > When the two enclosures are different, it does even matter > with respect to rendering: > > .Oo Fl t Ar table > .Fl T Ar command > .Pq Ar address ... Oc > > produces > > [-t table -T command (address ...]) > > in both old and new groff, and also in mandoc. > > > of course i can move the Oc to a separate line, but > > why should i? > > Because then you get nice nesting: > Then the Op is completely contained in the Oo. > > I admit groff doesn't warn about bad nesting, > but then again, groff issues very few warnings at all. > > Yours, > Ingo i don;t totally understand. Oo/Oc need not happen on the same line, so i consider it fair game that i can stick Oc on the end of an Op line. are you saying it's a limit of the parser and i shouldn;t do it? not only does groff not warn about it, it also renders it correctly (as does mandoc). hence my confusion that it generates a warning. jmc -- To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv