summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Lua/Module/Template.hs
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2022-01-02 11:04:10 +0100
committerJohn MacFarlane <jgm@berkeley.edu>2022-01-29 08:43:14 -0800
commit412596c30baec47041ccb3b1823f9beca7c98d76 (patch)
tree59304d347943c3998360e6d50016eefc4cdf5146 /src/Text/Pandoc/Lua/Module/Template.hs
parenta6fa3df1146f7aee4e3bfa4cf506ab44e38ecb35 (diff)
Switch to hslua-2.1
This allows for some code simplification and improves stability.
Diffstat (limited to 'src/Text/Pandoc/Lua/Module/Template.hs')
-rw-r--r--src/Text/Pandoc/Lua/Module/Template.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Lua/Module/Template.hs b/src/Text/Pandoc/Lua/Module/Template.hs
index cd66ce1c1..967fe31a8 100644
--- a/src/Text/Pandoc/Lua/Module/Template.hs
+++ b/src/Text/Pandoc/Lua/Module/Template.hs
@@ -42,7 +42,7 @@ functions =
Nothing -> runWithDefaultPartials
(compileTemplate "templates/default" template))
<#> parameter peekText "string" "template" "template string"
- <#> optionalParameter peekString "string" "templ_path" "template path"
+ <#> opt (stringParam "templ_path" "template path")
=#> functionResult (either failLua pushTemplate) "pandoc Template"
"compiled template"
@@ -53,8 +53,8 @@ functions =
forcePeek $ peekText top `lastly` pop 1
format <- maybe getFORMAT pure mformat
getDefaultTemplate format)
- <#> optionalParameter peekText "string" "writer"
- "writer for which the template should be returned."
+ <#> opt (textParam "writer"
+ "writer for which the template should be returned.")
=#> functionResult pushText "string"
"string representation of the writer's default template"