From 4c3b3bf65a769eaec4b8382d8ada4f28a3b91e04 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sun, 1 Oct 2017 00:33:56 -0700 Subject: Lua: move sha1 from pandoc.mediabag to pandoc. --- src/Text/Pandoc/Lua/PandocModule.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Text/Pandoc/Lua/PandocModule.hs b/src/Text/Pandoc/Lua/PandocModule.hs index 5d826883d..ecb1c530f 100644 --- a/src/Text/Pandoc/Lua/PandocModule.hs +++ b/src/Text/Pandoc/Lua/PandocModule.hs @@ -63,6 +63,9 @@ pushPandocModule datadir = do Lua.push "__read" Lua.pushHaskellFunction readDoc Lua.rawset (-3) + Lua.push "sha1" + Lua.pushHaskellFunction sha1HashFn + Lua.rawset (-3) -- | Get the string representation of the pandoc module pandocModuleScript :: Maybe FilePath -> IO String @@ -93,7 +96,6 @@ pushMediaBagModule commonState mediaBagRef = do addFunction "lookup" (lookupMediaFn mediaBagRef) addFunction "list" (mediaDirectoryFn mediaBagRef) addFunction "fetch" (fetch commonState mediaBagRef) - addFunction "sha1" sha1HashFn return () where addFunction name fn = do -- cgit v1.2.3