From: Ingo Schwarze <schwarze@usta.de> To: Jan Stary <hans@stare.cz>, "Jason A. Donenfeld" <Jason@zx2c4.com> Cc: discuss@mandoc.bsd.lv Subject: Re: discrepancy between groff and mandoc for html rendering of wg-quick(8) Date: Wed, 12 Feb 2020 16:06:42 +0100 [thread overview] Message-ID: <20200212150642.GB20240@athene.usta.de> (raw) In-Reply-To: <20200212070229.GA90820@www.stare.cz> Hi Jan, hi Jason, Jan Stary wrote on Wed, Feb 12, 2020 at 08:02:29AM +0100: > On Feb 11 23:59:21, Jason@zx2c4.com wrote: >> [mandoc] https://manpages.debian.org/testing/wireguard-tools/wg-quick.8.en.html > That is not the output of mandoc -Thmtl as such. > That's mandoc's html output inset into a debian webpage. While that is true, it is not really relevant. The OP did find a bug in mandoc, which you can see by comparing the output from the following two commands, even with mandoc -current: $ printf "A\n.br\nB\n" | mandoc -T html $ printf "A\n.br\n B\n" | mandoc -T html In the second case, the <br/> element is missing between the "A" and the "B", even though in terminal output mode (i.e. without the -T html), the line break is correctly emitted in both cases. A first superficial inspection reveals that the validation module is probably making invalid assumptions that leading whitespace on an input line automatically implies a line break for all output modes, which is not true for HTML. I'll need to have a closer look how to fix this; i'm not yet sure whether the validator or the formatter or both need to be changed. >> [groff] https://git.zx2c4.com/wireguard-tools/about/src/man/wg-quick.8 > That is not the output of gorff -Thmtl -mman either. > That's groff's html output inset into a webpage. Again, not really relevant. It does show that groff respects the .br request, which, of course, is not surprising at all. >> Look at the "EXAMPLES" section. Notice weird line break issues with mandoc. >> Is this a man page source bug or a mandoc bug? >> Source is here: https://git.zx2c4.com/wireguard-tools/tree/src/man/wg-quick.8 > Take that source, produce the two html outputs > > mandoc -Thtml wg-quick.8 > wg.mandoc.html > groff -Thtml -mman wg-quick.8 > wg.groff.html > > and compare the results. They are different, > but none has the line breaks in EXAMPLES. According to my testing, "groff -Thtml -mman wg-quick.8" does produce the expected line breaks, e.g.: [...] <h2>EXAMPLES [...] <p style="margin-left:11%; margin-top: 1em">[Peer] <br> PublicKey = GtL7fZc/bLnqZldpVofMCD6hDjrK28SsdLxevJ+qtKU= <br> PresharedKey = /UwcSPg38hW/D9Y3tcS1FOV0K1wuURMbS0sesJEP5ak= <br> AllowedIPs = 0.0.0.0/0 <br> Endpoint = demo.wireguard.com:51820</p> I think we are talking about the <br> lines before and after "PresharedKey", for example. So the bug report is clearly valid and also precise enough to help me fix it. Thanks for the report, Ingo -- To unsubscribe send an email to discuss+unsubscribe@mandoc.bsd.lv
next prev parent reply other threads:[~2020-02-12 15:06 UTC|newest] Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <CAHmME9rVyL+QUhks0J8xOpykb6V+5wKadgowc8bndP=Shi5gyA@mail.gmail.com> 2020-02-11 22:59 ` Jason A. Donenfeld 2020-02-12 7:02 ` Jan Stary 2020-02-12 15:06 ` Ingo Schwarze [this message] 2020-02-12 15:14 ` Jan Stary 2020-02-12 15:25 ` Ingo Schwarze 2020-02-12 21:44 ` Ingo Schwarze 2020-02-13 4:29 ` Stephen Gregoratto 2020-02-13 4:49 ` [PATCH] Fix formatting in wg-quick(8) Stephen Gregoratto 2020-02-13 8:57 ` Raf Czlonka 2020-02-13 16:31 ` Jason A. Donenfeld 2020-02-13 18:34 ` Ingo Schwarze 2020-02-13 17:57 ` Ingo Schwarze 2020-02-13 18:00 ` Jason A. Donenfeld 2020-02-13 19:34 ` Ingo Schwarze 2020-02-13 19:55 ` Jason A. Donenfeld 2020-02-13 22:28 ` Ingo Schwarze 2020-02-13 22:38 ` Jason A. Donenfeld 2020-02-13 22:44 ` Jan Stary 2020-02-13 23:21 ` Steffen Nurpmeso 2020-02-14 4:00 ` Anthony J. Bentley 2020-02-14 11:08 ` Jason A. Donenfeld 2020-02-14 15:05 ` Ingo Schwarze 2020-02-14 22:36 ` Anthony J. Bentley 2020-02-14 18:20 ` Ingo Schwarze 2020-02-15 0:45 ` [PATCH v2] Rewrite wg-quick.8 in mdoc Stephen Gregoratto 2020-02-15 19:53 ` Jason A. Donenfeld 2020-02-16 10:32 ` Stephen Gregoratto 2020-02-16 15:52 ` Ingo Schwarze 2020-02-13 16:34 ` discrepancy between groff and mandoc for html rendering of wg-quick(8) Jason A. Donenfeld
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=20200212150642.GB20240@athene.usta.de \ --to=schwarze@usta.de \ --cc=Jason@zx2c4.com \ --cc=discuss@mandoc.bsd.lv \ --cc=hans@stare.cz \ --subject='Re: discrepancy between groff and mandoc for html rendering of wg-quick(8)' \ /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).