zotero / citeproc-js-server

Web service to generate citations and bibliographies using citeproc-js
Other
60 stars 39 forks source link

document citeproc.js changes? #23

Closed titaniumbones closed 5 years ago

titaniumbones commented 8 years ago

The readme says citeproc.js needs to be modified to work with node. Can you describe these changes and/or submit them to upstream as patches? i would like to experiment with some additional output formats, in a way that maximises chances of acceptance both here and upstream.

ailintom commented 6 years ago

If one compares the citeproc.js file in citeproc-node with the original file of version 1.1.63, one sees that citeproc-node uses csl_json.js (copied from xmljson.js from the citeproc-js project), and does not use csl_nodejs_jsdom. Whence the only two differences in citeproc.js. line 574 (of the original file) var CSL_NODEJS = require("./csl_nodejs_jsdom").CSL_NODEJS_JSDOM;
becomes var CSL_JSON = require("./csl_json.js").CSL_JSON; in citeproc-node. lines 593-595 of the original file if ("undefined" !== typeof CSL_IS_NODEJS) {
XML_PARSING = CSL_NODEJS;
} else if ("undefined" !== typeof CSL_E4X) {
are replaced with if ("undefined" !== typeof CSL_E4X) {
in citeproc-node.

dstillman commented 5 years ago

I don't think modifications are required anymore.