diff --git a/csl/core/engine.lua b/csl/core/engine.lua index 6800c9412..8ad4f4736 100644 --- a/csl/core/engine.lua +++ b/csl/core/engine.lua @@ -380,13 +380,14 @@ function CslEngine:_layout (options, content, entries) if options.delimiter then return self:_render_delimiter(output, options.delimiter) end - -- (Normally citations have a delimiter options) - local delim = self.mode == "citation" and ", " or "" + -- (Normally citations have a delimiter options, so we should only reach + -- this point for the bibliography) + local delim = self.mode == "citation" and "; " or "" -- references all belong to a different paragraph -- FIXME: should account for attributes on the toplevel bibliography element: -- line-spacing -- hanging-indent - return table.concat(output, "") + return table.concat(output, delim) end function CslEngine:_text (options, content, entry) @@ -1215,7 +1216,7 @@ end -- @tparam table entry List of CSL entries -- @treturn string The XML citation string function CslEngine:cite (entries) - local entries = type(entries) == "table" and not entries.type and entries or { entries } + entries = type(entries) == "table" and not entries.type and entries or { entries } return self:_process(entries, "citation") end @@ -1223,7 +1224,7 @@ end -- @tparam table entry List of CSL entries -- @treturn string The XML reference string function CslEngine:reference (entries) - local entries = type(entries) == "table" and not entries.type and entries or { entries } + entries = type(entries) == "table" and not entries.type and entries or { entries } return self:_process(entries, "bibliography") end