Juris-M / citeproc-js

A JavaScript implementation of the Citation Style Language (CSL) https://citeproc-js.readthedocs.io
Other
303 stars 85 forks source link

Is citeproc-js currently not conforming to collapse_ChicagoAfterCollapse.txt? #175

Open denismaier opened 3 years ago

denismaier commented 3 years ago

A user has reported an issue with Chicago Author Date styles. Collapsing of multiple citations is currently incorrect.

According to the test suite, we should get these results:

(Whittaker 1967, 1975; Wiens 1989a, 1989b) (Wong 1999, 328; 2000, 475; Garcia 1998, 67) (Whittaker 1967; Wiens 1989b)

However, even without locators multiple works by the same author are currently separated with a semicolon rather than with a comma. Earlier that should have worked correctly. Is that a regression?

fbennett commented 3 years ago

Without any hint of complaint or criticism, could I ask that this and future bugs be represented by a test filed as a pull request to https://github.com/Juris-M/citeproc-js, under fixtures/local, confirmed to reproduce the bug?

denismaier commented 3 years ago

Shouldn't running cslrun -a reveal the bug? Anyway... I'm getting strange errors runing the test suite on a newly cloned citeproc-js repo:

Rebundling processor

Error: ENOENT: no such file or directory, scandir 'C:\Users\denis\Desktop\citeproc-js\fixtures\std\processor-tests\humans'

Error: ENOENT: no such file or directory, scandir 'C:\Users\denis\Desktop\citeproc-js\fixtures\std\processor-tests\humans'
    at Object.readdirSync (fs.js:891:3)
    at checkAll (C:\Users\denis\AppData\Roaming\npm\node_modules\citeproc-test-runner\runtests.js:260:29)
    at fetchTestData (C:\Users\denis\AppData\Roaming\npm\node_modules\citeproc-test-runner\runtests.js:310:13)
    at bundleValidateTest (C:\Users\denis\AppData\Roaming\npm\node_modules\citeproc-test-runner\runtests.js:660:9)
    at C:\Users\denis\AppData\Roaming\npm\node_modules\citeproc-test-runner\runtests.js:862:13
    at Object.<anonymous> (C:\Users\denis\AppData\Roaming\npm\node_modules\citeproc-test-runner\runtests.js:875:3)
    at Module._compile (internal/modules/cjs/loader.js:1151:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1171:10)
    at Module.load (internal/modules/cjs/loader.js:1000:32)
    at Function.Module._load (internal/modules/cjs/loader.js:899:14) {
  errno: -4058,
  syscall: 'scandir',
  code: 'ENOENT',
  path: 'C:\\Users\\denis\\Desktop\\citeproc-js\\fixtures\\std\\processor-tests\\humans'
}

Any hints?

fbennett commented 3 years ago

You will get that error when the repo is cloned without the --recursive option as shown in the README. To install the submodules and their descendants in an existing repository clone, you can do:

git submodule init;
git submodule update;

Then running cslrun -a should run and show three errors, from abbreviation failures in legal support that are not relevant to the delimiter issue.

denismaier commented 3 years ago

Ok, cslrun works now. (I was getting a bunch of errors when cloning recursively though. Looks like you need to have access to a couple of repos.)

That aside, the test runs as expected. So, if there is a bug, it must be elsewhere...

denismaier commented 3 years ago

This is what I'm currently getting with Juris-M and Chicago Author Date (17th edition):

grafik

Obviously, there should be a comma.