typst / biblatex

A Rust crate for parsing and writing BibTeX and BibLaTeX files.
Apache License 2.0
120 stars 15 forks source link

Parsing error on unprotected numbers #23

Closed aurelien-naldi closed 2 years ago

aurelien-naldi commented 2 years ago

The following bibtex is valid but trigger a parsing error (unknown abbreviation "2020": 274-278):

@article{bullshit2020,
    title={At-scale impact of the {Net Wok}: A culinarically holistic investigation of distributed dumplings},
    author={Astley, Rick and Morris, Linda},
    journal={Armenian Journal of Proceedings},
    volume={61},
    pages={192--219},
    year=2020,
    publisher={Automattic Inc.}
  }

The problem comes from the value of the "year" field which is not enclosed (which is allowed in bibltex and found in many places).

reknih commented 2 years ago

Thank you for filing this bug! The rewrite of the parser caused this regression (and it also caused the test suite to regress and not test this due to a missing .unwrap). I will push a fix and a release.