Skip to content

Commit

Permalink
Use short_help if help is absent
Browse files Browse the repository at this point in the history
  • Loading branch information
frostming authored and stephenfin committed Mar 21, 2018
1 parent 27f24c1 commit 7ce2b04
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sphinx_click/ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,12 @@ def _format_description(ctx):
We parse this as reStructuredText, allowing users to embed rich
information in their help messages if they so choose.
"""
if not ctx.command.help:
help_string = ctx.command.help or ctx.command.short_help
if not help_string:
return

for line in statemachine.string2lines(
ctx.command.help, tab_width=4, convert_whitespace=True):
help_string, tab_width=4, convert_whitespace=True):
yield line
yield ''

Expand Down

0 comments on commit 7ce2b04

Please sign in to comment.