click-contrib / click-man

Automate generation of man pages for python click applications :star:
MIT License
163 stars 35 forks source link

man page format broken in debian 12 #59

Open ziusan opened 1 year ago

ziusan commented 1 year ago

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 commented 1 year ago

See #60 for a simple fix to this issue.