From 43f1d5da935d8da9847f5d08aaea5ed3dfd79eac Mon Sep 17 00:00:00 2001
From: Henrik Levkowetz <henrik@levkowetz.com>
Date: Thu, 13 Oct 2011 14:36:26 +0000
Subject: [PATCH] Improved extraction of draft title during submission.  Fixed
 a problem where the scan for an author's email address was prematurely
 terminated because another author's affiliation also was part of this
 author's address information.  - Legacy-Id: 3445

---
 ietf/utils/draft.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/ietf/utils/draft.py b/ietf/utils/draft.py
index dc666a145..f2dd51bc3 100755
--- a/ietf/utils/draft.py
+++ b/ietf/utils/draft.py
@@ -40,7 +40,7 @@ import stat
 import sys
 import time
 
-version = "0.21"
+version = "0.23"
 program = os.path.basename(sys.argv[0])
 progdir = os.path.dirname(sys.argv[0])
 
@@ -646,7 +646,7 @@ class Draft():
                             for k in range(i+1, len(authors)):
                                 if authors[k] and authors[k].lower() in companies:
                                     authors[k] = None
-                        elif not "@" in line:
+                        elif blanklines and not "@" in line:
                             # Break on an author name
                             _debug( " - Break on other author name")
                             break
@@ -698,6 +698,8 @@ class Draft():
         match = re.search('(?:\n\s*\n\s*)((.+\n){0,2}(.+\n*))(\s+<?draft-\S+\s*\n)\s*\n', self.pages[0])
         if not match:
             match = re.search('(?:\n\s*\n\s*)<?draft-\S+\s*\n*((.+\n){1,3})\s*\n', self.pages[0])
+        if not match:
+            match = re.search('(?:\n\s*\n\s*)((.+\n){0,2}(.+\n*))(\s*\n){2}', self.pages[0])
         if not match:
             match = re.search('(?i)(.+\n|.+\n.+\n)(\s*status of this memo\s*\n)', self.pages[0])
         if match: