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

Parallel delimiter override working well in citation but not in bibliography

georgd opened this issue · comments

In this test, where citation and bibliography call the same macros, the bibliography entry should look exactly like the citations but it doesn’t. The current output is:

OGH 12.02.1998, 2 Ob 328/97t = SZ 71/21., JBl 1999, 54 (<i>Karollus</i>)., ecolex 1998, 692 (<i>Wilhelm</i>).
>>===== MODE =====>>
all
<<===== MODE =====<<

>>===== KEYS =====>>
[
  "ITEM-1",
  "ITEM-2",
  "ITEM-3"
]
<<===== KEYS =====<<

>>===== DESCRIPTION =====>>
AT Case with parallel cites
<<===== DESCRIPTION =====<<

>>===== RESULT =====>>
FIRST
  OGH 2 Ob 328/97t = SZ 71/21 = JBl 1999, 54 (<i>Karollus</i>) = ecolex 1998, 692 (<i>Wilhelm</i>).
BIBLIOGRAPHY
<div class="csl-bib-body">
  <div class="csl-entry">OGH 2 Ob 328/97t = SZ 71/21 = JBl 1999, 54 (<i>Karollus</i>) = ecolex 1998, 692 (<i>Wilhelm</i>).</div>
</div>
<<===== RESULT =====<<

>>===== INPUT =====>>
[
  {
    "id": "ITEM-1",
    "type": "legal_case",
    "container-title": "SZ",
    "volume": "71/21",
    "authority": "ogh",
    "number": "2 Ob 328/97t",
    "issued": {
      "date-parts": [
        [
          1998,
          2,
          12
        ]
      ]
    },
    "note": "",
    "multi": {
      "main": {},
      "_keys": {}
    },
    "jurisdiction": "at",
    "seeAlso": [
      "ITEM-2",
      "ITEM-3"
    ]
  },
  {
    "id": "ITEM-2",
    "type": "legal_case",
    "commenter": [
      {
        "literal": "Karollus"
      }
    ],
    "container-title": "JBl",
    "authority": "ogh",
    "number": "2 Ob 328/97t",
    "page": "54",
    "issued": {
      "date-parts": [
        [
          1998,
          2,
          12
        ]
      ]
    },
    "note": "",
    "multi": {
      "main": {},
      "_keys": {}
    },
    "jurisdiction": "at",
    "publication-date": {
      "date-parts": [
        [
          1999
        ]
      ]
    },
    "seeAlso": [
      "ITEM-1",
      "ITEM-3"
    ]
  },
  {
    "id": "ITEM-3",
    "type": "legal_case",
    "commenter": [
      {
        "literal": "Wilhelm"
      }
    ],
    "container-title": "ecolex",
    "authority": "ogh",
    "number": "2 Ob 328/97t",
    "page": "692",
    "issued": {
      "date-parts": [
        [
          1998,
          2,
          12
        ]
      ]
    },
    "note": "",
    "multi": {
      "main": {},
      "_keys": {}
    },
    "jurisdiction": "at",
    "publication-date": {
      "date-parts": [
        [
          1998
        ]
      ]
    },
    "seeAlso": [
      "ITEM-1",
      "ITEM-2"
    ]
  }
]
<<===== INPUT =====<<


>>===== OPTIONS =====>>
{
  "wrap_url_and_doi": true
}
<<===== OPTIONS =====<<

The CSL snippets relevant for this are:

<macro name="juris-title">
  <text variable="title" form="short" prefix="[" suffix="]"/>
</macro>
<macro name="juris-main">
  <group delimiter=" " parallel-first="authority number" parallel-delimiter-override=" = ">
      <!--<group no-repeat="authority">-->
      <names variable="authority">
        <name/>
        <institution institution-parts="short">
          <institution-part name="short"/>
        </institution>
      </names>
      <!--</group>-->
    <text variable="genre" prefix="(" suffix=")"/>
    <group delimiter=", ">
      <choose>
        <if>
          <conditions match="any">
            <condition variable="container-title" match="none"/>
            <condition context="bibliography"/>
          </conditions>
          <date variable="issued" form="numeric"/>
        </if>
      </choose>
      <number variable="number"/>
    </group>
  </group>
</macro>
<macro name="juris-tail">
  <group delimiter=" ">
    <text variable="container-title" prefix="= "/>
    <group delimiter=", ">
      <group delimiter="/">
        <number variable="volume"/>
        <date variable="publication-date" date-parts="year" form="numeric"/>
        <number variable="collection-number"/>
        <number variable="issue"/>
      </group>
      <number variable="page"/>
    </group>
    <names variable="commenter" font-style="italic" prefix="(" suffix=")">
      <name/>
    </names>
    <text variable="references" prefix="= "/>
  </group>
</macro>
<macro name="full-citation">
  <group delimiter=" ">
    <group delimiter=" ">
      <text macro="juris-main"/>
      <text macro="juris-title"/>
      <text macro="juris-tail"/>
    </group>
  </group>
</macro>
<citation>
  <layout prefix="" suffix="." delimiter="; ">
   <text macro="full-citation"/>
  </layout>
</citation>
<bibliography>
  <layout suffix=".">
    <text macro="full-citation"/>
  </layout>
</bibliography>

This should be fixed now. b4035f6