Skip to content

Commit 85a4981

Browse files
authored
Fixed DocDetails.pages having leading/trailing whitespace (#1008)
1 parent 20f795c commit 85a4981

File tree

3 files changed

+472
-1
lines changed

3 files changed

+472
-1
lines changed

paperqa/types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ def merge_bibtex_entries(entry1: Entry, entry2: Entry) -> Entry:
621621
def misc_string_cleaning(data: dict[str, Any]) -> dict[str, Any]:
622622
"""Clean strings before the enter the validation process."""
623623
if pages := data.get("pages"):
624-
data["pages"] = pages.replace("--", "-").replace(" ", "")
624+
data["pages"] = pages.replace("--", "-").replace(" ", "").strip()
625625
return data
626626

627627
@staticmethod

0 commit comments

Comments
 (0)