Make sure to not include draft name in the title extracted from draft text.
- Legacy-Id: 12176
This commit is contained in:
parent
5c562abec2
commit
887455c1d5
|
@ -927,8 +927,9 @@ class Draft():
|
|||
if match:
|
||||
title = match.group(1)
|
||||
title = title.strip()
|
||||
title = re.sub('\s*\n\s*', ' ', title)
|
||||
title = re.sub(' +', ' ', title)
|
||||
title = re.sub(r'(?s)\n\s*\<?draft-.*$','', title)
|
||||
title = re.sub(r'\s*\n\s*', ' ', title)
|
||||
title = re.sub(r' +', ' ', title)
|
||||
self._title = title
|
||||
return self._title
|
||||
self.errors["title"] = "Could not find the title on the first page."
|
||||
|
|
Loading…
Reference in a new issue