Remove more common prefixes
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
This commit is contained in:
parent
16085843c8
commit
e1cfff3216
1 changed files with 1 additions and 0 deletions
|
@ -139,6 +139,7 @@ class Metadata:
|
|||
self._description = self._summary = None
|
||||
return
|
||||
description = description.replace('\n\n', '\r').replace('\n', ' ').replace('\r', '\n').strip()
|
||||
description = re.sub(rf'^(?:{self.name}|This(?:\s+\w+)?)(?:\s*,|\s+is|\s+provides)\s+', '', description, flags=re.I)
|
||||
description = re.sub(r'^(?:a|an|the)\s+', '', description, flags=re.I)
|
||||
description = f'{description[0].upper()}{description[1:]}'
|
||||
if description[-1] != '.':
|
||||
|
|
Loading…
Reference in a new issue