Skip to content

Commit 16b4c3c

Browse files
committed
perhaps fix publish error with inlined lua
1 parent 9a4d10b commit 16b4c3c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/resources/filters/quarto-post/cites.lua

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
-- cites.lua
22
-- Copyright (C) 2020-2022 Posit Software, PBC
33

4-
local cites = pandoc.List()
4+
local discoveredCites = pandoc.List()
55
local kRefsIndentifier = "refs-target-identifier"
66

77
function indexCites()
@@ -14,9 +14,9 @@ function indexCites()
1414
end
1515
end,
1616
Cite = function(el)
17-
el.citations:map(function (cite)
18-
cites:insert(cite.id)
19-
end)
17+
for i,v in ipairs(el.citations) do
18+
discoveredCites:insert(v.id)
19+
end
2020
end
2121
}
2222
end
@@ -37,7 +37,7 @@ function writeCites()
3737
-- write the cites
3838
local inputFile = quarto.doc.input_file
3939
local relativeFilePath = pandoc.path.make_relative(inputFile, quarto.project.directory)
40-
documentCites[relativeFilePath] = cites
40+
documentCites[relativeFilePath] = discoveredCites
4141

4242
-- write the file
4343
local json = quarto.json.encode(documentCites)

0 commit comments

Comments
 (0)