Hi Andrew, hi Chris,
Chris Bennett wrote on Sun, Aug 16, 2020 at 01:01:07PM -0500:
> On Sat, Aug 15, 2020 at 09:39:58PM -0700, Andrew Hewus Fresh wrote:
>> On Wed, Aug 12, 2020 at 11:15:49AM -0500, Chris Bennett wrote:
>>> I submitted p5-Plack-Request-WithEncoding-0.13 previously.
>>> Newer version just went up. Upstream is friendly to changes.
>>>
>>> The POD has some problems that cause mandoc errors after noticing
>>> that the man page looked bad.
>> I think that's just the way the pod is written. It seems the author
>> likes a much wider terminal than I do and so things just wrap weird.
>> If I pull my terminal out to at least 150 columns it looks better.
>>
>> I think the only fix is to reformat the content into something that fits
>> into a more reasonably sized terminal.
I did not check the manual page (it seems the port is not yet
committed?), so unless someone says otherwise, i'll assume afresh1@
is right, this individual manual page is wrong, and this part is
not a formatter problem.
>>> # mandoc -T lint /usr/local/man/man3p/Plack::Request::WithEncoding.3p
>>> mandoc: /usr/local/man/man3p/Plack::Request::WithEncoding.3p:35:1: \
>>> ERROR: escaped character not allowed in a name: br\&
>>>
>>> I'm not familiar enough with POD to man to know what the right change
>>> is. Upstream accepted my previous documentation changes without a
>>> problem.
>> I'm pretty sure that's just what pod2man outputs, so the fix is probably
>> unrelated to this particular port. If you run that lint command against
>> any other 3p manpage and they are pretty much all the same.
Ouch. I just fixed that in mandoc, with the following commit.
Thanks for mentioning the issue.
Yours,
Ingo
Log Message:
-----------
Avoid artifacts in the most common case of closing conditional blocks
when no arguments follow the closing brace, \}.
For example, the line "'br\}" contained in the pod2man(1) preamble
would throw a bogus "escaped character not allowed in a name" error.
This issue was originally reported by Chris Bennett on ports@,
and afresh1@ noticed it came from the pod2man(1) preamble.
Modified Files:
--------------
mandoc:
roff.c
Revision Data
-------------
Index: roff.c
===================================================================
RCS file: /home/cvs/mandoc/mandoc/roff.c,v
retrieving revision 1.375
retrieving revision 1.376
diff -Lroff.c -Lroff.c -u -p -r1.375 -r1.376
--- roff.c
+++ roff.c
@@ -2362,7 +2362,9 @@ roff_cond_checkend(ROFF_ARGS)
while ((ep = strchr(ep, '\\')) != NULL) {
switch (ep[1]) {
case '}':
- if (rr)
+ if (ep[2] == '\0')
+ ep[0] = '\0';
+ else if (rr)
ep[1] = '&';
else
memmove(ep, ep + 2, strlen(ep + 2) + 1);