params: ensure short description is only a single line

So a UI can display it properly
This commit is contained in:
Beat Küng
2021-03-23 12:55:11 -04:00
committed by Daniel Agar
parent 2ab276f5ca
commit 629f7ba15b
25 changed files with 120 additions and 30 deletions
@@ -305,6 +305,8 @@ class SourceParser(object):
group = "Miscellaneous"
if state == "comment-processed":
if short_desc is not None:
if '\n' in short_desc:
raise Exception('short description must be a single line (parameter: {:})'.format(name))
param.SetField("short_desc", self.re_remove_dots.sub('', short_desc))
if long_desc is not None:
long_desc = self.re_remove_carriage_return.sub(' ', long_desc)