You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When writing any ParsingFailedBlock, including duplicate key blocks, the writer defaults to writing the raw bibtex back which was observed when parsing. In your case, as you manually created the entries, you did not specify such raw bibtex (which is an optional constructor parameter). In that sense, the library is working as intended.
In principle, changing this would be rather easy, as we could have the writer write the block.ignore_error_block (which is the block with the duplicate key) whenever a DuplicateBlockKeyBlock is faced. However, I'd be reluctant to merge such a change as the current rule "failed block => print raw" is nice and easy to understand and deviating from this will make things harder to grasp for most users.
I need to think about this for a bit and will get back asap.
MiWeiss
changed the title
Write of files with duplicate blocks fails
Write of files with manually created duplicate blocks fails when no raw bibtex was specified
Sep 20, 2023
MiWeiss
changed the title
Write of files with manually created duplicate blocks fails when no raw bibtex was specified
Write of manually created duplicate blocks fails when no raw bibtex was specified
Sep 20, 2023
Describe the bug
Writing a library with duplicate blocks leads to:
Reproducing
Version: Latest from PyPI
Workaround
Checking for duplicate entries beforehand.
Remaining Questions (Optional)
Please tick all that apply:
The text was updated successfully, but these errors were encountered: