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

Unexpected delimiter preceding last literal name #218

Open
zepinglee opened this issue Dec 10, 2022 · 0 comments
Open

Unexpected delimiter preceding last literal name #218

zepinglee opened this issue Dec 10, 2022 · 0 comments

Comments

@zepinglee
Copy link
Contributor

In the following fixture, the delimiter-precedes-last is set always globally and the delimiter of <name> is empty. This may seem odd but it makes sense in Chinese. The output is correct for names with separate name parts but citeproc-js produces an extra comma for literal names.

      + expected - actual

      -John Doe和Jane Roe; John Doe, 和Jane Roe
      +John Doe和Jane Roe; John Doe和Jane Roe
>>===== MODE =====>>
citation
<<===== MODE =====<<


>>===== RESULT =====>>
John Doe和Jane Roe; John Doe和Jane Roe
<<===== RESULT =====<<


>>===== CSL =====>>
<style
    xmlns="http://purl.org/net/xbiblio/csl"
    class="note"
    version="1.0"
    delimiter-precedes-last="always"
    default-locale="zh-CN">
  <info>
    <id/>
    <title/>
    <updated>2022-08-07T03:28:57+00:00</updated>
  </info>
  <citation>
    <layout delimiter="; ">
      <names variable="author">
        <name delimiter="" and="text"/>
      </names>
    </layout>
  </citation>
</style>
<<===== CSL =====<<


>>===== INPUT =====>>
[
    {
        "id": "ITEM-1",
        "type": "book",
        "author": [
            {
                "family": "Doe",
                "given": "John"
            },
            {
                "family": "Roe",
                "given": "Jane"
            }
        ]
    },
    {
        "id": "ITEM-2",
        "type": "book",
        "author": [
            {
                "literal": "John Doe"
            },
            {
                "literal": "Jane Roe"
            }
        ]
    }
]
<<===== INPUT =====<<


>>===== VERSION =====>>
1.0
<<===== VERSION =====<<
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant