Skip to content

Commit ef4d55f

Browse files
committed
Apply patch from Henrik Levkowetz to fix some problems of author parse
errors where the affiliation is mistakenly thought to be an extra author (some of these still remain) - Legacy-Id: 13142
1 parent 36f4273 commit ef4d55f

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

ietf/utils/draft.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -703,10 +703,15 @@ def dotexp(s):
703703
break
704704

705705
found_pos = []
706+
company_or_author = None
706707
for i in range(len(authors)):
707708
_debug("1: authors[%s]: %s" % (i, authors[i]))
708709
_debug(" company[%s]: %s" % (i, companies[i]))
709710
author = authors[i]
711+
if i+1 < len(authors):
712+
company_or_author = authors[i+1]
713+
else:
714+
company_or_author = None
710715
if author in [ None, '', ]:
711716
continue
712717
suffix_match = re.search(" %(suffix)s$" % aux, author)
@@ -875,7 +880,8 @@ def dotexp(s):
875880
if authmatch:
876881
_debug(" ? Other author or company ? : %s" % authmatch)
877882
_debug(" Line: "+line.strip())
878-
if nonblank_count == 1 or (nonblank_count == 2 and not blanklines):
883+
_debug(" C or A: %s"%company_or_author)
884+
if nonblank_count == 1 or (nonblank_count == 2 and not blanklines) or (company_or_author==line.strip() and not blanklines):
879885
# First line after an author -- this is a company
880886
companies_seen += [ c.lower() for c in authmatch ]
881887
companies_seen += [ line.strip().lower() ] # XXX fix this for columnized author list

0 commit comments

Comments
 (0)