Sunday, August 27, 2017

Citation.js Version 0.3 Released!

It’s been in beta since January 30, but here it is: Citation.js version 0.3. Below I explain the changes since the last blog post, and under that is a more complete change log. Also some upcoming changes.

Recent changes

Custom citation formatting

One of the remaining milestones for v0.3.0 was a better API for custom citation formatting, as outlined in the previous post. The exact implementation differs a bit, but is essentially the same. Docs can be found here.

Async

Cite#add() and Cite#set() now have asynchronous siblings, Cite#addAsync() and Cite#setAsync().

Both async and sync test cases are needed for full coverage, so I won’t just change one into another, as I previously suggested.

Parsers

The BibTeX parser got a big update, improving both the text-parsing code and the JSON-transforming code.

The Wikidata issue (sorry for the GIF) is fixed now, and I like the current API and code. The solution is inspired by the recent BibTeX refactoring.