##// END OF EJS Templates
commands: Check if helptext contains a newline before we split
David Soria Parra -
r9280:b694531a default
parent child Browse files
Show More
@@ -1555,7 +1555,10 b' def help_(ui, name=None, with_version=Fa'
1555 raise error.UnknownCommand(name)
1555 raise error.UnknownCommand(name)
1556
1556
1557 doc = gettext(mod.__doc__) or _('no help text available')
1557 doc = gettext(mod.__doc__) or _('no help text available')
1558 head, tail = doc.split('\n', 1)
1558 if '\n' not in doc:
1559 head, tail = doc, ""
1560 else:
1561 head, tail = doc.split('\n', 1)
1559 ui.write(_('%s extension - %s\n\n') % (name.split('.')[-1], head))
1562 ui.write(_('%s extension - %s\n\n') % (name.split('.')[-1], head))
1560 if tail:
1563 if tail:
1561 ui.write(minirst.format(tail, textwidth))
1564 ui.write(minirst.format(tail, textwidth))
General Comments 0
You need to be logged in to leave comments. Login now