File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -672,10 +672,15 @@ def dotexp(s):
672672 break
673673
674674 found_pos = []
675+ company_or_author = None
675676 for i in range (len (authors )):
676677 _debug ("1: authors[%s]: %s" % (i , authors [i ]))
677678 _debug (" company[%s]: %s" % (i , companies [i ]))
678679 author = authors [i ]
680+ if i + 1 < len (authors ):
681+ company_or_author = authors [i + 1 ]
682+ else :
683+ company_or_author = None
679684 if author in [ None , '' , ]:
680685 continue
681686 suffix_match = re .search (" %(suffix)s$" % aux , author )
@@ -843,7 +848,8 @@ def dotexp(s):
843848 if authmatch :
844849 _debug (" ? Other author or company ? : %s" % authmatch )
845850 _debug (" Line: " + line .strip ())
846- if nonblank_count == 1 or (nonblank_count == 2 and not blanklines ):
851+ _debug (" C or A: %s" % company_or_author )
852+ if nonblank_count == 1 or (nonblank_count == 2 and not blanklines ) or (company_or_author == line .strip () and not blanklines ):
847853 # First line after an author -- this is a company
848854 companies_seen += [ c .lower () for c in authmatch ]
849855 companies_seen += [ line .strip ().lower () ] # XXX fix this for columnized author list
You can’t perform that action at this time.
0 commit comments