diff --git a/click_man/core.py b/click_man/core.py index 73b431d..cecf510 100644 --- a/click_man/core.py +++ b/click_man/core.py @@ -11,6 +11,7 @@ import os from distutils.version import LooseVersion +from inspect import cleandoc import click @@ -40,7 +41,7 @@ def generate_man_page(ctx, version=None): man_page = ManPage(ctx.command_path) man_page.version = version man_page.short_help = get_short_help_str(ctx.command) - man_page.description = ctx.command.help + man_page.description = cleandoc(ctx.command.help) man_page.synopsis = ' '.join(ctx.command.collect_usage_pieces(ctx)) man_page.options = [x.get_help_record(ctx) for x in ctx.command.params if isinstance(x, click.Option)] commands = getattr(ctx.command, 'commands', None)