tech@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: наб <nabijaczleweli@nabijaczleweli.xyz>
To: tech@mandoc.bsd.lv
Subject: Bizarre .Nm-breaking-.Bd's-<pre> in -Thtml behaviour?
Date: Tue, 12 Oct 2021 21:42:30 +0200	[thread overview]
Message-ID: <20211012194230.aoxlusoaktmokwuc@tarta.nabijaczleweli.xyz> (raw)

[-- Attachment #1: Type: text/plain, Size: 1483 bytes --]

Hi!

This one's weird, since I've written dozens of this sort of table before
and it's always worked, but this is somehow broken. A minimal example is
-- >8 --
.Sh NAME
.Nm a
.
.Sh EXAMPLES
.Bd -literal
.Nm
b
.Ed
-- >8 --

Which yields
-- >8 --
nabijaczleweli@tarta:~/uwu/mandoc$ ./mandoc -mdoc -Thtml -Ofragment ../kl.8
<table class="head">
  <tr>
    <td class="head-ltitle">UNTITLED</td>
    <td class="head-vol">LOCAL</td>
    <td class="head-rtitle">UNTITLED</td>
  </tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<p class="Pp"><code class="Nm">a</code></p>
</section>
<section class="Sh">
<h1 class="Sh" id="EXAMPLES"><a class="permalink" href="#EXAMPLES">EXAMPLES</a></h1>
<div class="Bd Li">
<pre><code class="Nm"></code></pre>
a
b</div>
</section>
</div>
<table class="foot">
  <tr>
    <td class="foot-date"></td>
    <td class="foot-os"></td>
  </tr>
</table>
-- >8 --

Note how a and b are both (a) past Nm and (b) past the <pre>. This has
an additional funny side-effect of inlining the rest of the display
block. Macros still work, but text is laid normally by the browser,
rather than literally.

I don't know what triggers this in this case and not all others,
but an explicit .Nm argument fixes it (but that's, uh, suboptimal).

Happens on mandoc 1.14.5-1 off Debian and 2021-10-12T21:41:37+02:00 off
CVS.

Best,
наб

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

             reply	other threads:[~2021-10-12 19:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-12 19:42 наб [this message]
2021-10-15 23:16 ` Bizarre .Nm-breaking-.Bd's-<pre> in -Thtml behaviour analysis + not a patch наб

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=20211012194230.aoxlusoaktmokwuc@tarta.nabijaczleweli.xyz \
    --to=nabijaczleweli@nabijaczleweli.xyz \
    --cc=tech@mandoc.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).