discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Aman Verma <amanraoverma+vim@gmail.com>
To: discuss@mandoc.bsd.lv
Subject: In HTML output literal blocks should strip newline before closing pre
Date: Thu, 15 Oct 2020 16:48:50 -0400	[thread overview]
Message-ID: <CA+c7JOBAxCfT35p6p-p3M9d3T9k=FDMt9E+UcyTHhEOf2MHfiQ@mail.gmail.com> (raw)

The problem with `.Bd -literal` blocks in HTML output is that mandoc
doesn't output the
closing pre tag on the same line. If the element is indented, browsers
will display an
extra line since pre is telling them to preserve whitespace.

A good example of the issue is
<https://mandoc.bsd.lv/man/mdoc.7.html#NAME>. The extra
space is clearly visible. The source is

        <pre>.Nm name0 ,
    .Nm name1 ,
    .Nm name2
    .Nd a one line description
        </pre>

What I'm proposing is that it should look like

        <pre>.Nm name0 ,
    .Nm name1 ,
    .Nm name2
    .Nd a one line description</pre>

This is what most Markdown processors do to solve the issue.

Best regards,
Aman
--
 To unsubscribe send an email to discuss+unsubscribe@mandoc.bsd.lv


             reply	other threads:[~2020-10-15 20:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-15 20:48 Aman Verma [this message]
2020-10-16 17:46 ` Ingo Schwarze
2020-10-25 20:45   ` Michael Stapelberg
2020-10-26 13:26     ` Ingo Schwarze
2020-10-26 13:42       ` Michael Stapelberg

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='CA+c7JOBAxCfT35p6p-p3M9d3T9k=FDMt9E+UcyTHhEOf2MHfiQ@mail.gmail.com' \
    --to=amanraoverma+vim@gmail.com \
    --cc=discuss@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).