Skip to content
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

HTML output does not enclose bibliography entries in <div class="csl-entry"/> tags #90

Open
adomasven opened this issue Dec 2, 2020 · 7 comments

Comments

@adomasven
Copy link
Member

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.

@adomasven
Copy link
Member Author

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.

@fbennett
Copy link

fbennett commented Dec 2, 2020

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.)

@adomasven
Copy link
Member Author

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.

@cormacrelf
Copy link
Collaborator

A newline as the separator in the bibliography metadata ought to do it, right? That makes the most sense to me.

@cormacrelf
Copy link
Collaborator

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.

@adomasven
Copy link
Member Author

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.

@fbennett
Copy link

fbennett commented Dec 3, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants