Skip to content

Commit

Permalink
new lua filter
Browse files Browse the repository at this point in the history
  • Loading branch information
retorquere committed Mar 30, 2022
1 parent 9751cbf commit f9c57b5
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions resource/list-citekeys.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,15 @@ function Cite(cite)
return nil
end

printed = false
function Block(block)
body = ''
if not printed then
printed = true
for id, _ in pairs(citekeys) do
body = body .. id .. ' '
end
function Pandoc(doc)
body = {}
for citekey, _ in pairs(citekeys) do
table.insert(body, pandoc.Plain(citekey))
end
return pandoc.Plain(body)
return pandoc.Pandoc(body)
end

return {
{ Cite = Cite },
{ Block = Block },
{ Pandoc = Pandoc },
}

0 comments on commit f9c57b5

Please sign in to comment.