-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@Comment cause ParserException::unexpectedCharacter #49
Comments
Thanks for reporting this issue. Your solution is a good start, and I would like to fix it for all the cases I found in the link you bring up: @Comment{jabref-meta: databaseType:bibtex;}
@Comment{jabref-entrytype: Poster: req[author;title;year;organization] opt[abstract]}
@Comment{
@Book{steward03,
author = {Martha Steward},
title = {Cooking behind bars},
publisher = {Culinary Expert Series},
year = 2003
}
} If I got your point, in the exemple above, the A alternative way to solve the problem is skiping/ignoring
Advantage: We can keep the parser able to read char-by-char, as currently it does. What do you think? Note: This change could break this test: https://github.com/renanbr/bibtex-parser/blob/master/tests/Parser/CommentTest.php#L34-L67 |
JabRef case is fixed (not yet released): I'm having problems in understanding this sentence:
So, what's the braces' role for an comment "entry"? In the bibtex bellow, I'm willing to consider the existence of 3 entries (note the missing "}" at the end of the file): @comment{@book{title={I do exist}}}
@comment{
@book{title={I really do exist}}
}
@comment{ bla bla bla
@book{title={I'm real}} A first approach is available : https://github.com/renanbr/bibtex-parser/tree/comment-is-not-an-entry |
Hi,
I'm working on a .bib file that contain some "@comment{}" and when the parser arrive to one of them, it cause an error, because they don't have to be valid entry and some aren't...
In my case "@comment" are always on one line and no line is very long.
So I just fixed it with a "fgets" instead of "fread" and a small exeption in the parseFile function :
"@comment" in my .bib file :
I found that they are automaticaly added by JabRef (http://www.jabref.org/) at the end of the .bib file.
JabRef/jabref#2944
Have a nice day!
The text was updated successfully, but these errors were encountered: