mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-14 09:36:21 +01:00
Allow whitespace before ${cmd_name}.
This commit is contained in:
parent
b07ba53ad0
commit
ca8fe4273a
@ -788,10 +788,10 @@ class RawCmdln(cmd.Cmd):
|
||||
# practice dictates that command help strings begin with this, but
|
||||
# it isn't at all wanted for the command list.
|
||||
to_strip = "${cmd_name}:"
|
||||
if doc and doc.startswith(to_strip):
|
||||
if doc and doc.lstrip().startswith(to_strip):
|
||||
#log.debug("stripping %r from start of %s's help string",
|
||||
# to_strip, cmdname)
|
||||
doc = doc[len(to_strip):].lstrip()
|
||||
doc = (doc.lstrip())[len(to_strip):].lstrip()
|
||||
if not getattr(self._get_cmd_handler(cmdname), "hidden", None):
|
||||
linedata.append( (cmdstr, doc) )
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user