Skip to content

Commit

Permalink
Merge pull request #55 from Pezmc/fix-author-name
Browse files Browse the repository at this point in the history
Explicitly rejoin filter list to a string
  • Loading branch information
Pezmc authored Oct 8, 2021
2 parents f6410bc + 9feae86 commit cbea77f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion biblatex_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ def handleEntryField(lineNumber, line):

# Checks per field type
if fieldName == "author":
entryAuthor = filter(lambda x: not (x in '\\"{}'), fieldValue.split(" and ")[0])
entryAuthor = "".join(filter(lambda x: not (x in '\\"{}'), fieldValue.split(" and ")[0]))
for author in fieldValue.split(" and "):
comp = author.split(",")
if len(comp) == 0:
Expand Down
13 changes: 11 additions & 2 deletions tests/input.bib
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
% This file should fail with the commented errors
% 14 errors expected
% 15 errors expected
% "misc": ["author/editor", "title", "year/date"]
% year/date missing
Expand Down Expand Up @@ -95,4 +95,13 @@ @report{bibLatexChecker
address={Address is an alias fro location},
type = {Website},
year = {2014},
}
}

% "book": ["author", "title", "year/date"],
% Capitals handled, and no errors in author field
% year/date field missing
@book {hartshorne1977algebraic,
AUTHOR = {Hartshorne R},
TITLE = {Algebraic geometry},
NOTE = {Graduate Texts in Mathematics, No. 52},
}

0 comments on commit cbea77f

Please sign in to comment.