Conversation
|
Thanks for using my library! I like to create test-cases before committing code to the repo to help ensure bugs don't come back. Do you have an example of the endless loop (like a bibtex file or entry that causes it)? |
|
Thanks for the library, it makes my life much easier maintaining a literature list online. The problem I ran into, as I realized now, was actually caused by a malformatted bibtex file on my side. More specifically, if a comma is missing between entries, e.g. With the fix, even a malformatted entry will be parsed, but any property after the missing "," won't make it into the parsed version of the dataset. I am not sure if either behaviour (endless loop vs. silently not parsing the whole entry) is more preferable. |
|
You're welcome. I'm glad it helps. Thank you for the explanation and example. I was trying to figure out why it would endlessly loop but I was assuming the bib entry was formatted correctly. An improperly formatted bib file would definitely cause problems. I think the best option is to trigger an error and hopefully an error that can show the user where the formatting problem is in the bib file. I've been needing to look at better error detection rather than failing silently or looping endlessly. I'll also look into the other two changes you made which seem more like formatting changes. |
|
Did you happen to look at the console output of your web browser when had the malformed bibtex entry or when you thought the program was endlessly looping? For example when I test the example below (missing comma): @book{entry2,
author={First Last},
year={2019}
vol={1}
}I get the error below which points to the issue followed by the rest of the bibtex file: |
Great library! Ran into some small problems setting it up, pull request has the fixes I've implemented.