diff options
author | Albert Krewinkel <albert@zeitkraut.de> | 2017-12-21 22:30:59 +0100 |
---|---|---|
committer | Albert Krewinkel <albert@zeitkraut.de> | 2017-12-21 22:42:59 +0100 |
commit | bd3ea723717b54e3853487bee7a48947fb73b68a (patch) | |
tree | e0c68763a44e4d7156ebfbd46ed8446e976dd8f9 /src/Text/Pandoc/Lua/Module/Pandoc.hs | |
parent | 5ad719c1fb6dbf06cbf4f48e57ae4a6d187e0a5e (diff) | |
download | pandoc-bd3ea723717b54e3853487bee7a48947fb73b68a.tar.gz |
Lua modules: added pandoc.utils module
A new module `pandoc.utils` has been created. It holds utility functions
like `sha1`, which was moved from the main `pandoc` module.
Diffstat (limited to 'src/Text/Pandoc/Lua/Module/Pandoc.hs')
-rw-r--r-- | src/Text/Pandoc/Lua/Module/Pandoc.hs | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/src/Text/Pandoc/Lua/Module/Pandoc.hs b/src/Text/Pandoc/Lua/Module/Pandoc.hs index ed80b9715..5b8714e07 100644 --- a/src/Text/Pandoc/Lua/Module/Pandoc.hs +++ b/src/Text/Pandoc/Lua/Module/Pandoc.hs @@ -32,7 +32,6 @@ module Text.Pandoc.Lua.Module.Pandoc import Control.Monad (when) import Data.Default (Default (..)) -import Data.Digest.Pure.SHA (sha1, showDigest) import Data.Maybe (fromMaybe) import Data.Text (pack) import Foreign.Lua (ToLuaStack, FromLuaStack, Lua, NumResults, liftIO) @@ -59,7 +58,6 @@ pushModule datadir = do loadScriptFromDataDir datadir "pandoc.lua" addFunction "read" readDoc addFunction "pipe" pipeFn - addFunction "sha1" sha1HashFn addFunction "walk_block" walkBlock addFunction "walk_inline" walkInline return 1 @@ -88,12 +86,6 @@ readDoc content formatSpecOrNil = do Left s -> raiseError (show s) -- error while reading _ -> raiseError "Only string formats are supported at the moment." -sha1HashFn :: BL.ByteString - -> Lua NumResults -sha1HashFn contents = do - Lua.push $ showDigest (sha1 contents) - return 1 - -- | Pipes input through a command. pipeFn :: String -> [String] |