diff options
author | John MacFarlane <jgm@berkeley.edu> | 2017-10-01 00:33:56 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2017-10-01 00:33:56 -0700 |
commit | 4c3b3bf65a769eaec4b8382d8ada4f28a3b91e04 (patch) | |
tree | 55d9c3e31f5374feed4e9ae35f8da2a5cadc8d06 /src/Text/Pandoc/Lua | |
parent | 8768f7e5b060b4024d88d12f4255d515dd4ca7fa (diff) | |
download | pandoc-4c3b3bf65a769eaec4b8382d8ada4f28a3b91e04.tar.gz |
Lua: move sha1 from pandoc.mediabag to pandoc.
Diffstat (limited to 'src/Text/Pandoc/Lua')
-rw-r--r-- | src/Text/Pandoc/Lua/PandocModule.hs | 4 |
1 files changed, 3 insertions, 1 deletions
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 |