strip whitespace from long descriptions just to be safe
This commit is contained in:
parent
e356af2dc4
commit
d3bb69a0ac
@ -19,7 +19,7 @@ def serialize_as_go_string(x: str) -> str:
|
||||
def build_go_code(name: str, cmd: RemoteCommand, opts: Any, template: str) -> str:
|
||||
template = template[len('//go:build exclude'):]
|
||||
ans = template.replace('CMD_NAME', name).replace('__FILE__', __file__).replace('CLI_NAME', name.replace('_', '-')).replace(
|
||||
'SHORT_DESC', serialize_as_go_string(cmd.short_desc)).replace('LONG_DESC', serialize_as_go_string(cmd.desc))
|
||||
'SHORT_DESC', serialize_as_go_string(cmd.short_desc)).replace('LONG_DESC', serialize_as_go_string(cmd.desc.strip()))
|
||||
return ans
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user