discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Jackson Pauls <jacksonpauls@gmail.com>
To: discuss@mandoc.bsd.lv
Subject: Re: mandoc HTML output: minor issues
Date: Tue, 29 Aug 2017 16:56:27 +0100	[thread overview]
Message-ID: <CAM9P35vmxiKjG8cujPnKhZnsnJKKPSUvZA0XHy3OrD_B_wPnrg@mail.gmail.com> (raw)
In-Reply-To: <17497.1503996432@cathet.us>

Hi Anthony,

On 29 August 2017 at 09:47, Anthony J. Bentley <anthony@anjbe.name> wrote:
>> 4. Running v.Nu (https://validator.github.io/validator/) on a
>> collection of HTML files generated by mandoc picks up duplicate IDs,
>> and a bunch of other issues:
>> * unescaped characters in href attributes (%, "),
>> * unescaped characters in URL fragments (\, {, }, #, ^, [, ], <, |),
>> * <div>s appearing inside <pre>s, and
>> * mismatches between column count in <colgroup> and table rows.
>> I can gather a bunch of examples if of interest.
>
> Please do. mandoc(1) could use some improvement when it comes to
> producing valid HTML.

Ok, here goes:


Example of unescaped % in sudo.8:
 403 .It Li %H
becomes
375       [...]<a class="selflink" href="#%H">[...]
should be
<a class="selflink" href="#%25H">


Example of wrongly escaped double quote in sshd.8:
475 .It Cm command="command"
becomes
337   [...]<a class="selflink" href="#command=&quot;command&quot;">[...]
should be
<a class="selflink" href="#command=%22command%22">


Example of unescaped space character in URL path in sudoers.5:
3378 For more information see
3379 .Xr "GROUP PROVIDER PLUGINS" .
becomes
2305     For more information see <a class="Xr" title="Xr"
href="/1/GROUP PROVIDER
2306       PLUGINS">GROUP PROVIDER PLUGINS</a>.</dd>
the href should be "/1/GROUP%20PROVIDER%20PLUGINS"


Example of unescaped { and } characters in fragment in visudo.8:
347 .It Li Warning: unused {User,Runas,Host,Cmnd}_Alias
becomes
242 [...]<a class="selflink"
href="#Warning:_unused_{User,Runas,Host,Cmnd}_Alias">[...]
should be
<a class="selflink" href="#Warning:_unused_%7BUser,Runas,Host,Cmnd%7D_Alias">

There are other issues with unescaped characters in URL fragments,
which can only contain a limited set of characters:
https://stackoverflow.com/a/26119120


Example of a <div> inside a <pre> (cause by a missing </pre>) in rpld.conf.5:
 96 .Bd -literal -ffset indent
 97         foo = something;
 98 or
 99 .Bd -literal -ffset indent
100         bar;
101
102 .Ed
becomes
 52 <div class="Bd" style="margin-left: 0.00ex;">
 53 <pre class="Li">
 54         foo = something;
 55 or
 56
 57 <div class="Pp"></div>
 58 <div class="Bd" style="margin-left: 0.00ex;">
 59 <pre class="Li">
 60         bar;
 61
 62 </pre>
 63 </div>
Maybe that's just an issue with the manual (missing .Ed), but maybe on
hitting the second .Bd mandoc(1) could assume an .Ed for the prior
.Bd.


Example of column count issue in tmux.1:
 475 .Bl -column "XXXXXXXXXX" "X"
 476 .It Sy "Token" Ta Sy "" Ta Sy "Meaning"
becomes
 372 <table class="Bl-column">
 373   <colgroup>
 374     <col style="width: 15.00ex;"/>
 375     <col style="min-width: 1.00ex;"/>
 376   </colgroup>
 377   <tr class="It-column">
 378     <td class="It-column"><b class="Sy" title="Sy">Token</b></td>
 379     <td class="It-column"><b class="Sy" title="Sy"></b></td>
 380     <td class="It-column"><b class="Sy" title="Sy">Meaning</b></td>
 381   </tr>
v.Nu says "error: A table row was 3 columns wide and exceeded the
column count established using column markup (2)," but in practice I'm
not sure how important this is.


Finally, one bonus oddity I just noticed, an opening paren "(" going
stray in dnstop.8:
165 .It *
166 show sources + 8th level query names
167 .It (
168 show sources + 9th level query names
becomes
178   <dt class="It-tag">*</dt>
179   <dd class="It-tag">show sources + 8th level query names</dd>
180   (
181   <dt class="It-tag"></dt>
182   <dd class="It-tag">show sources + 9th level query names</dd>


Cheers, Jackson

www.mankier.com
--
 To unsubscribe send an email to discuss+unsubscribe@mandoc.bsd.lv

      reply	other threads:[~2017-08-29 15:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-25  9:52 Jackson Pauls
2017-08-29  8:47 ` Anthony J. Bentley
2017-08-29 15:56   ` Jackson Pauls [this message]

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=CAM9P35vmxiKjG8cujPnKhZnsnJKKPSUvZA0XHy3OrD_B_wPnrg@mail.gmail.com \
    --to=jacksonpauls@gmail.com \
    --cc=discuss@mandoc.bsd.lv \
    --subject='Re: mandoc HTML output: minor issues' \
    /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

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