diff --git a/pandoc/filters/current_date.lua b/pandoc/filters/current_date.lua new file mode 100644 index 0000000..1679302 --- /dev/null +++ b/pandoc/filters/current_date.lua @@ -0,0 +1,12 @@ +SCRIPT_NAME = "current_date.lua" +os.setlocale("C") + +return { + { Meta = function(m) + if m.date == nil then + os.setlocale(os.getenv("LANG")) + m.date = os.date("%c") + return m + end + end } +} diff --git a/pandoc/filters/link_headings.lua b/pandoc/filters/link_headings.lua new file mode 100644 index 0000000..dc0f28d --- /dev/null +++ b/pandoc/filters/link_headings.lua @@ -0,0 +1,11 @@ +SCRIPT_NAME = "link_headings.lua" +os.setlocale("C") + +local Link = pandoc.Link + +return { + { Header = function(h) + h.content = Link(h.content, ("#%s"):format(h.attr.identifier)) + return h + end } +}