From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp1.rz.uni-karlsruhe.de (Debian-exim@smtp1.rz.uni-karlsruhe.de [129.13.185.217]) by krisdoz.my.domain (8.14.3/8.14.3) with ESMTP id o8GLNahw003843 for ; Thu, 16 Sep 2010 17:23:38 -0400 (EDT) Received: from hekate.usta.de (asta-nat.asta.uni-karlsruhe.de [172.22.63.82]) by smtp1.rz.uni-karlsruhe.de with esmtp (Exim 4.63 #1) id 1OwLvZ-0004C4-W6; Thu, 16 Sep 2010 23:23:34 +0200 Received: from donnerwolke.usta.de ([172.24.96.3]) by hekate.usta.de with esmtp (Exim 4.71) (envelope-from ) id 1OwLvZ-0004Bz-Uq for discuss@mdocml.bsd.lv; Thu, 16 Sep 2010 23:23:33 +0200 Received: from hera.usta.de ([172.24.64.3]) by donnerwolke.usta.de with esmtp (Exim 4.69) (envelope-from ) id 1OwLvZ-0002jw-Tm for discuss@mdocml.bsd.lv; Thu, 16 Sep 2010 23:23:33 +0200 Received: from schwarze by hera.usta.de with local (Exim 4.72) (envelope-from ) id 1OwLvZ-0004Rt-R4 for discuss@mdocml.bsd.lv; Thu, 16 Sep 2010 23:23:33 +0200 Date: Thu, 16 Sep 2010 23:23:33 +0200 From: Ingo Schwarze To: discuss@mdocml.bsd.lv Subject: Re: WARNING: blocks badly nested: Oc breaks Op Message-ID: <20100916212333.GB5462@usta.de> References: <20100911074624.GC5369@bramka.kerhand.co.uk> 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: <20100911074624.GC5369@bramka.kerhand.co.uk> User-Agent: Mutt/1.5.20 (2009-06-14) 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 -- To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv