Files
pandoc/pandoc-lua-engine/test/writer-template.lua
Albert Krewinkel 8900b0f953 Lua: Support built-in default templates for custom writers
Custom writers can define a default template via a global `Template`
function; the data directory is no longer searched for a default
template.

Writer authors can restore the old lookup behavior with

``` lua
Template = function ()
  local template
  return template.compile(template.default(PANDOC_SCRIPT_FILE))
end
```
2022-10-14 10:37:37 -07:00

8 lines
173 B
Lua

function Writer (doc, opts)
return pandoc.write(doc, 'gfm', opts)
end
function Template ()
return pandoc.template.compile '<!-- start -->\n$body$\n<!-- stop -->\n'
end