(ctx)
Format the description for a given `click.Command`.

    We parse this as reStructuredText, allowing users to embed rich
    information in their help messages if they so choose.
Format the description for a given `click.Command`.
Format the description for a given click . Command .
def _format_description(ctx):
    """Format the description for a given `click.Command`.

    We parse this as reStructuredText, allowing users to embed rich
    information in their help messages if they so choose.
    """
    help_string = ctx.command.help or ctx.command.short_help
    if not help_string:
        return

    help_string = ANSI_ESC_SEQ_RE.sub('', help_string)

    bar_enabled = False
    for line in statemachine.string2lines(
        help_string, tab_width=4, convert_whitespace=True
    ):
        if line == '\b':
            bar_enabled = True
            continue
        if line == '':
            bar_enabled = False
        line = '| ' + line if bar_enabled else line
        yield line
    yield ''
def _format_description ( ctx ) : help_string = ctx . command . help or ctx . command . short_help if not help_string : return help_string = ANSI_ESC_SEQ_RE . sub ( '' , help_string ) bar_enabled = False for line in statemachine . string2lines ( help_string , tab_width = 4 , convert_whitespace = True ) : if line == '\b' : bar_enabled = True continue if line == '' : bar_enabled = False line = '| ' + line if bar_enabled else line yield line yield ''