Open hubgit opened 5 years ago
Feel free to close this if newlines in RIS fields aren't valid - it feels like that would be reasonable, as otherwise the contents of the text could accidentally start a new field.
Yeah I don't have the info on hand, but I believe all fields are supposed to proceed until the end of the line without any new lines.
If you're able to find documentation negating that, I'd be happy to look into adjusting the parser.
Did this file get generated from some other application? Haven't ran into this before myself.
Did this file get generated from some other application?
I'm testing with BibTeX files generated by https://lens.org but there are some other issues with abstracts (e.g. XML markup) in the files that suggest it's still a work-in-progress.
If you're able to find documentation negating that, I'd be happy to look into adjusting the parser.
I found this in the RIS specification:
How to handle long fields
If the information following any one tag is more than 70 characters long, it is allowable (though not necessary) to insert a carriage return/line feed at the end of 70 characters, and continue on the next line.
That's my experience too -- newlines are allowed, but the RIS parser will get confused if the text-with-newlines includes a valid field identifier after a newline. So encoding the abstract pretty strange\n\nAS - oops!\n
as AS - pretty strange\n\nAS - oops!\n
will confuse RIS parsers, but AS - pretty strange\n\n fine!\n
will parse OK.
I'm not 100% sure whether newlines are valid within RIS fields, and it's not too hard to run a filter to remove them before passing the data to
astrocite
if needed, but I ran into this issue and thought it might be something that should be handled by the parser.Code
Expected behavior:
A parsed item, with an abstract containing newlines.
Actual behavior: