diff --git a/pandoc/filters/inline_lua.lua b/pandoc/filters/inline_lua.lua new file mode 100644 index 0000000..29310fb --- /dev/null +++ b/pandoc/filters/inline_lua.lua @@ -0,0 +1,10 @@ +SCRIPT_NAME = "inline_lua.lua" +os.setlocale("C") + +return { + { CodeBlock = function(el) + if el.classes[1] == "lua" and el.classes[2] == "inline" then + return load(el.text)() + end + end } +} diff --git a/pandoc/filters/resolve_internal_links.lua b/pandoc/filters/resolve_internal_links.lua index 632ee0d..bb32826 100644 --- a/pandoc/filters/resolve_internal_links.lua +++ b/pandoc/filters/resolve_internal_links.lua @@ -10,7 +10,8 @@ return { local f = io.open(fp) if f == nil then - print(("[WARNING] Broken link: %s"):format(l.target)) -- TODO: update for pandoc.info + local input_file = PANDOC_STATE.input_files[1] + print(("[WARNING] Broken link: %s -> %s"):format(input_file, l.target)) -- TODO: update for pandoc.info return l.content end f:close()