discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
* man_validate.c PP/LP macro confusion
@ 2020-02-29 18:57 Robert Mustacchi
  2020-03-01 23:05 ` Ingo Schwarze
  0 siblings, 1 reply; 2+ messages in thread
From: Robert Mustacchi @ 2020-02-29 18:57 UTC (permalink / raw)
  To: discuss

Hi,

While dealing with a number of old manual pages that haven't been
converted to mdoc yet, I noticed that when asking mandoc to lint them
(mandoc -Tline <file>), the error message it generates has confused a
few folks. The following is the warning:

mandoc: abs.3c:10:2: WARNING: skipping paragraph macro: PP after SH

The warning itself is clear; however, the source actually uses a .LP
macro and not a .PP macro. Most of the time folks know to map the two
together, but it would be a little clearer if it listed the actual macro
that was present in the document that was invalid.

I believe this happens because man_validate() in man_validate.c
explicitly converts the .LP macro internally to be treated as a .PP.
When it then triggers this check in post_SH(), it uses the modified name
to print out the warning. The same appears to be true check_par().

While it's possible to modify things such that the warning generates the
right token name, I wasn't sure if such a change would be desired or
accepted given the explicit consolidation and transformation for this
being done in man_validate(). I'd appreciate hearing what others thought.

Thanks,
Robert
--
 To unsubscribe send an email to discuss+unsubscribe@mandoc.bsd.lv

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-03-01 23:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-29 18:57 man_validate.c PP/LP macro confusion Robert Mustacchi
2020-03-01 23:05 ` Ingo Schwarze

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).