From f9c57b538ee70c41d7a903aa6d1750bda1a9800a Mon Sep 17 00:00:00 2001 From: Emiliano Heyns Date: Wed, 30 Mar 2022 20:12:07 +0200 Subject: [PATCH] new lua filter --- resource/list-citekeys.lua | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/resource/list-citekeys.lua b/resource/list-citekeys.lua index ce7fe34f5b..b17fcc6490 100644 --- a/resource/list-citekeys.lua +++ b/resource/list-citekeys.lua @@ -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 }, }