discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Ingo Schwarze <schwarze@usta.de>
To: nabijaczleweli@nabijaczleweli.xyz
Cc: Jan Stary <hans@stare.cz>, discuss@mandoc.bsd.lv
Subject: Re: No-arg .Nm (also .Bx?) breaks .Bd -literal?
Date: Mon, 6 Jun 2022 12:44:44 +0200	[thread overview]
Message-ID: <Yp3anPorF9Xbb4uc@asta-kit.de> (raw)
In-Reply-To: <20220605185421.nffa3wb2zgwa7yx7@tarta.nabijaczleweli.xyz>

Hi,

Nab wrote on Sun, Jun 05, 2022 at 08:54:21PM +0200:
> On Sun, Jun 05, 2022 at 08:24:27PM +0200, Jan Stary wrote:

>> Please provide a _minimal_ complete example.

Actually, both complete real-world manual pages demonstrating a mandoc
bug and minimal examples help.

If you send fuzzing results, for example from afl(1), then minimizing
them is very useful because it can be quite hard to isolate the source
of a problem from a full-blown fuzzer-generated input file.

If you send a bug report involving a real-world manual page, minimizing
is much less important because isolating the problem is usually not
too difficult and time consuming when dealing with code written by a
human or even by an automatic mdoc(7) or man(7) code generator.
In this case, having the full page helps to judge the severity
of the impact in context.

>> In short, don;t make it artificially harder to help you.

I don't consider Nab's reports as hard to understand, they seem
clear and to the point to me.

> This calls Nm exactly twice:
> -- >8 --
> $ ./mandoc -Thtml -Ofragment -mdoc
> .Nm tr
> .Bd -literal
> .Nm
> .Ed
[....]
> <div class="Bd Pp Li">
> <pre><code class="Nm"></code></pre>
> tr</div>

The .Nm macro is usually an in-line macro, but in the SYNOPSIS
section, it can be a block macro.  I suspect the mandoc bug might
be related to -T html mistreating .Nm as a block macro here,
but i'm not sure yet and didn't look at the details.

> $ ./mandoc -Thtml -Ofragment -mdoc
> .Bd -literal
> .Bx
> .Ed
[...]
> <div class="Bd Pp Li">
> <pre><span class="Ux"></span></pre>
> BSD</div>

That's even more surprising; .Bx is never a block macro, so maybe
there is another bug or the bug has a different reason after all.

For now, i added this TODO entry:

  --- HTML issues ----------------------------------------------

  - .Nm without an argument and .Bx cause premature </pre>
     Nab Sun, 5 Jun 2022 18:30:09 +0200

Thanks for the report,
  Ingo
--
 To unsubscribe send an email to discuss+unsubscribe@mandoc.bsd.lv


  reply	other threads:[~2022-06-06 10:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-05 16:30 наб
     [not found] ` <Ypz026hcl/USRzsr@www.stare.cz>
2022-06-05 18:54   ` наб
2022-06-06 10:44     ` Ingo Schwarze [this message]
2022-06-06 15:39       ` наб

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=Yp3anPorF9Xbb4uc@asta-kit.de \
    --to=schwarze@usta.de \
    --cc=discuss@mandoc.bsd.lv \
    --cc=hans@stare.cz \
    --cc=nabijaczleweli@nabijaczleweli.xyz \
    /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).