Skip to content

Commit 61300a9

Browse files
committed
Fix title extraction. Patch provided to yaco 2011-03-14, committed to yaco/idsubmit branch as [2887].
- Legacy-Id: 2918 Note: SVN reference [2887] has been migrated to Git commit fb7219c
1 parent 9ae7b90 commit 61300a9

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

ietf/utils/draft.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,11 +575,12 @@ def get_authors(self):
575575
def get_title(self):
576576
if self._title:
577577
return self._title
578-
title_re = re.compile('(.+\n){1,3}(\s+<?draft-\S+\s*\n)')
578+
title_re = re.compile('(?:\n\s*\n\s*)((.+\n){1,3})(\s+<?draft-\S+\s*\n)\s*\n')
579579
match = title_re.search(self.pages[0])
580580
if match:
581581
title = match.group(1)
582582
title = title.strip()
583+
title = re.sub('\s*\n\s*', ' ', title)
583584
self._title = title
584585
return self._title
585586
# unusual title extract

0 commit comments

Comments
 (0)