bibtex icon indicating copy to clipboard operation
bibtex copied to clipboard

Parsing breaks on JabRef comments

Open stmichaelis opened this issue 2 years ago • 3 comments

JabRef for managing BibTeX-libraries can add special settings in @Comment-Entries at the end of the file, e.g. @Comment{jabref-meta: databaseType:biblatex;}. Parsing these breaks with an error unknown string variable: jabref-meta:. While these entries of course are not valid BibTeX, shouldn't comments be accepted "as is"?

stmichaelis avatar Dec 04 '23 16:12 stmichaelis

Yeah probably, the @comment spec I found was this.

If the entry type is @Comment, [it] is not considered to be the start of an entry. (Actually, the rule is that everything from the @Comment and to the end of line is ignored. The remainder lines of the commented entry is ignored by the first comment mechanism we described; in particular a @Comment does not need to be a valid entry, i.e. it can for example skip comas between two fields).

nickng avatar Dec 06 '23 23:12 nickng

I would assume the definition in bibtex.y for commententry would need to changed, as longstring expects parsable BibTeX-entries? Unfortunately, I have no idea about yacc to be much of a help here.

stmichaelis avatar Dec 11 '23 16:12 stmichaelis

My apologies for not getting back to you earlier. I assumed Github would notify me about updates here, seems not to be the case for commits mentioning an issue (or I overlooked it).

Tested the new release and can confirm it works for me.

stmichaelis avatar Apr 11 '24 08:04 stmichaelis