From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 19832 invoked from network); 6 Jun 2022 10:44:53 -0000 Received: from bsd.lv (HELO mandoc.bsd.lv) (66.111.2.12) by inbox.vuxu.org with ESMTPUTF8; 6 Jun 2022 10:44:53 -0000 Received: from fantadrom.bsd.lv (localhost [127.0.0.1]) by mandoc.bsd.lv (OpenSMTPD) with ESMTP id 4f69e28f for ; Mon, 6 Jun 2022 05:44:48 -0500 (EST) Received: from scc-mailout-kit-02.scc.kit.edu (scc-mailout-kit-02.scc.kit.edu [129.13.231.82]) by mandoc.bsd.lv (OpenSMTPD) with ESMTP id 9c1f000b for ; Mon, 6 Jun 2022 05:44:47 -0500 (EST) Received: from hekate.asta.kit.edu ([2a00:1398:5:f401::77]) by scc-mailout-kit-02.scc.kit.edu with esmtps (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (envelope-from ) id 1nyAE2-005Phv-43; Mon, 06 Jun 2022 12:44:46 +0200 Received: from login-1.asta.kit.edu ([2a00:1398:5:f400::72]) by hekate.asta.kit.edu with esmtp (Exim 4.94.2) (envelope-from ) id 1nyAE0-005cet-2U; Mon, 06 Jun 2022 12:44:44 +0200 Received: from schwarze by login-1.asta.kit.edu with local (Exim 4.92) (envelope-from ) id 1nyAE0-0003k4-Ey; Mon, 06 Jun 2022 12:44:44 +0200 Date: Mon, 6 Jun 2022 12:44:44 +0200 From: Ingo Schwarze To: nabijaczleweli@nabijaczleweli.xyz Cc: Jan Stary , discuss@mandoc.bsd.lv Subject: Re: No-arg .Nm (also .Bx?) breaks .Bd -literal? Message-ID: References: <20220605163009.6q2rxkbky6bxcx3t@tarta.nabijaczleweli.xyz> <20220605185421.nffa3wb2zgwa7yx7@tarta.nabijaczleweli.xyz> X-Mailinglist: mandoc-discuss Reply-To: discuss@mandoc.bsd.lv MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 [....] >
>
> tr
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 [...] >
>
> BSD
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 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