click-man icon indicating copy to clipboard operation
click-man copied to clipboard

man page format broken in debian 12

Open ziusan opened this issue 1 year ago • 1 comments

I just tried to build my application for debian 12 (bookworm) and discovered that the format of the generated man pages is broken. The reason for that is that in the recent click versions the docstring indentation isn't cleaned anymore by click.

Example click code:

def mycommand(ctx):
    """This is my command

    ABCD

    .SH EXAMPLE
    Some example text ...
    """

Output in debian 11 with python3-click-man (0.4.1-2) and python3-click (7.1.2-1):

.SH DESCRIPTION
This is my command
.PP
ABCD
.PP
.SH EXAMPLE
Some example text ...

Output in debian 12 with python3-click-man (0.4.1-2) and python3-click (8.1.3-2):

.SH DESCRIPTION
This is my command
.PP
    ABCD
.PP
    .SH EXAMPLE
    Some example text ...

As you can see the indentation is now also part of the man page in debian 12 with the result that indented formatting codes (like the .SH) aren't recognized.

ziusan avatar May 30 '23 12:05 ziusan