From: Jason McIntyre <jmc@kerhand.co.uk>
To: discuss@mdocml.bsd.lv
Subject: Re: WARNING: blocks badly nested: Oc breaks Op
Date: Thu, 16 Sep 2010 23:27:23 +0100 [thread overview]
Message-ID: <20100916222747.GB30810@bramka.kerhand.co.uk> (raw)
In-Reply-To: <20100916212333.GB5462@usta.de>
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: <Oo> <Op> </Oo> </Op>
>
> 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
next prev parent reply other threads:[~2010-09-16 22:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-11 7:46 Jason McIntyre
2010-09-16 21:23 ` Ingo Schwarze
2010-09-16 22:27 ` Jason McIntyre [this message]
2010-09-17 10:50 ` Joerg Sonnenberger
2010-09-17 14:08 ` Jason McIntyre
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100916222747.GB30810@bramka.kerhand.co.uk \
--to=jmc@kerhand.co.uk \
--cc=discuss@mdocml.bsd.lv \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).