Juris-M / citeproc-js

A JavaScript implementation of the Citation Style Language (CSL) https://citeproc-js.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Delimiting comma wrongly appearing outside quotation mark.

mccaskey opened this issue · comments

In the CSL for Chicago Manual of Style 17th edition (note), change the layout delimiter for <citation> from a semicolon to a comma, that is, change <layout suffix="." delimiter="; "> to <layout suffix="." delimiter=", ">, Select some journal articles. Ensure locale is en-US.

While the delimiting semicolon rightly appeared outside the closing quotation marks, a comma should appear inside. But it doesn’t. We get this citation

Galen, “My own books”, Fumerton, “Logic”, Grafton, “Ancient Works.”

instead of this one

Galen, “My own books,” Fumerton, “Logic,” Grafton, “Ancient Works.”

The suffix period got moved inside, so we know punctuation-in-quote is active,

The test fixture punctuation_SuppressPrefixPeriodForDelimiterSemicolon.txt reflects this behavior. It seems to be a deliberate design.

That test fixture has <citation><layout suffix="." delimiter="; ">.
Change the delimiter to a comma: <citation><layout suffix="." delimiter=", ">.

Doe, “His Anonymous Life”; Roe, “Her Anonymous Life.” should become
Doe, “His Anonymous Life,” Roe, “Her Anonymous Life.” with the comma inside the closing quoteation mark.

Somewhere in the code, there is a JS object with parameters for various combinations of punctuation and quotes. There should not be much left to chance on that front. I'll take a look when I get a chance. (If you don't hear back in awhile, feel free to ping. It's been a lethargic or a blue week here, I'm not sure which, but either way I might be slow and you're welcome to prompt and see if it prods me into action.)