Open adomasven opened 3 years ago
I've also just discovered, that citeproc-js adds \n
to plaintext output of bibliographies but citeproc-rs does not. I would probably value consistency here over what's more convenient to the API consumer in most cases, so maybe not adding any newlines at all is the correct thing to do.
You mean the trailing \n on bib entries? (There are two other instances in plain text output, for display="block" and display="indent", that should probably stay.)
Yes. Zotero generates the full bibl output by running entries.join(separator)
where separator
is an empty string for html and plaintext (""
) bibl entries, but \r\n
for rtf.
A newline as the separator in the bibliography metadata ought to do it, right? That makes the most sense to me.
I think I did add .csl-entry divs to the test suite output but wasn't sure at the time whether that should be an always thing. I'll check on this.
A newline as the separator in the bibliography metadata ought to do it, right? That makes the most sense to me.
This doesn't work for HTML output, but using the bibl metadata for this might be a good idea. There's markupPre
and markupPost
, so entryPre/Post
would make sense.
To align behavior, I can remove the trailing \n in citeproc-js. Alternatives would be to control the change with a processor option, or to just drop the newline and bump the minor version number with a note in CHANGES.txt. Plain text output probably doesn't see a lot of traffic, so leaning toward the latter ... thoughts welcome.
Citeproc-js encloses bibliography entries in
<div class="csl-entry"/>
tags. I am not sure if it's part of the spec and we can do this ourselves in a wrapper, but maybe it's the logical thing to do. Then again, the RTF output does not add\n
to the end of entries.