parsebib icon indicating copy to clipboard operation
parsebib copied to clipboard

Parsebib error on @ in citation key

Open sinauq opened this issue 1 year ago • 2 comments

Hello, after a recent update the library throws following error:

parsebib-parse-bib-buffer: [Parsebib error]: "Invalid character `@' at position (1110,7)"

The location it refers to is the @ in the citation key of the following bib entry:

@misc{[@mjnanakar]_2024,
  type = {{Tweet}},
  year = {2024},
  month = dec,
  journal = {Twitter},
....
  urldate = {2024-12-25},
  langid = {persian},
  keywords = {/unread}

}

I saw in this comment #https://github.com/joostkremers/parsebib/issues/36#issuecomment-2557095778 that you made considerable changes, so just wanted to let you know that this might be also one problem. As I remember it was okay before, but I will revert to a previous version for now.

sinauq avatar Mar 06 '25 18:03 sinauq

This is a bit surprising, because I thought I had already changed the parser to allow @ in keys... I'll need to take a closer look to figure out what's happening.

joostkremers avatar Mar 16 '25 10:03 joostkremers

Well, as it turns out, when I made a change to allow @ in keys (in commit f0e57a3) it wasn't actually the right fix, and I neglected to test it, apparently...

I now fixed it for real, and also added a test to make sure it continues working.

joostkremers avatar Mar 16 '25 23:03 joostkremers