bibtex-parser icon indicating copy to clipboard operation
bibtex-parser copied to clipboard

Problem with \{ in braced values

Open chfritz opened this issue 9 years ago • 1 comments

Hey,

Thanks for a great parser. I'm extending it right now in various ways for use in meteor. In the process I found a bug in your code:

https://github.com/mikolalysenko/bibtex-parser/blob/master/parse-bibtex.js#L106 needs to be: } else if (this.input[this.pos] == '{' && this.input[this.pos-1] != '\\') { i.e., you need to guard against escaped opening brackets, too, just like you do for closing ones, otherwise the count gets out of balance.

Let me know if you want a pull request.

cheers!

chfritz avatar Nov 22 '15 01:11 chfritz

I also encountered this problem when trying to parse a bibtex with "{" in title. This led to my CPU temperation to 98℃. Thanks chfritz for pointing this out!

winfredsu avatar Aug 10 '18 16:08 winfredsu