sciunto-org / python-bibtexparser

Bibtex parser for Python 3
https://bibtexparser.readthedocs.io
MIT License
474 stars 132 forks source link

parse_file replaces double-spaces in filenames #362

Closed geritwagner closed 1 year ago

geritwagner commented 1 year ago

I noticed that parse_file() does not seem to handle double spaces in filenames correctly. I am attaching a simple example for a failing test case:

from pybtex.database.input import bibtex
import io

bibtexstr = """
@test{id1,
 file = {fp  .pdf},
 }
"""

ret = bibtex.Parser().parse_file(io.StringIO(bibtexstr))
assert ret.entries["id1"].fields["file"] == "fp  .pdf"