Skip to content

Commit c357524

Browse files
committed
bibexport: ensure compatibility with upcoming pandoc release
1 parent 23f2238 commit c357524

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

bibexport/bibexport.lua

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ local List = require 'pandoc.List'
33

44
local citation_id_set = {}
55

6+
local type = utils.type or type
7+
68
-- Collect all citation IDs.
79
function Cite (c)
810
local cs = c.citations
@@ -37,7 +39,7 @@ function bibdata (bibliography)
3739
or stringifyMetaInlines(bibitem):gsub('%.bib$', '')
3840
end
3941

40-
local bibs = bibliography.t == 'MetaList'
42+
local bibs = (type(bibliography) == 'List' or bibliography.t == 'MetaList')
4143
and List.map(bibliography, bibname)
4244
or {bibname(bibliography)}
4345
return table.concat(bibs, ',')
@@ -62,7 +64,7 @@ function write_dummy_aux (bibliography, auxfile)
6264
local filename
6365
if type(auxfile) == 'string' then
6466
filename = auxfile
65-
elseif type(auxfile) == 'table' then
67+
elseif type(auxfile) == 'table' or type(auxfile) == 'Inlines' then
6668
-- assume list of inlines
6769
filename = utils.stringify(pandoc.Span(auxfile))
6870
else

0 commit comments

Comments
 (0)