From cc22e87f684d23bfccd1ea3ef08d5bc3e4162d99 Mon Sep 17 00:00:00 2001 From: rimerinos Date: Fri, 15 May 2026 17:59:07 -0400 Subject: [PATCH] Update Paper.py --- PyPaperBot/Paper.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/PyPaperBot/Paper.py b/PyPaperBot/Paper.py index 2f3b385..a8aeaf2 100644 --- a/PyPaperBot/Paper.py +++ b/PyPaperBot/Paper.py @@ -41,8 +41,10 @@ def getFileName(self): return "none.pdf" def setBibtex(self, bibtex): - x = bibtexparser.loads(bibtex, parser=None) - x = x.entries + pattern = r'(month\s*=\s*[\{\"]?)([A-Za-z]{3})[A-Za-z]*([\}\"]?)' + bibtex = re.sub(pattern, r'\1\2\3', bibtex, flags=re.IGNORECASE) + parser = bibtexparser.bparser.BibTexParser(common_strings=True) + x = bibtexparser.loads(bibtex, parser=parser) self.bibtex = bibtex