diff options
author | John MacFarlane <jgm@berkeley.edu> | 2017-06-10 18:26:44 +0200 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2017-06-10 18:26:44 +0200 |
commit | 94b3dacb4ea7e5e99ab62286b13877b92f9391b3 (patch) | |
tree | 4e1d9b98ebb2246c8a543163e980a927d25b0c34 /src/Text/Pandoc/Lua | |
parent | d6822157e75432e09210350e3b58eec3998dca76 (diff) | |
download | pandoc-94b3dacb4ea7e5e99ab62286b13877b92f9391b3.tar.gz |
Changed all readers to take Text instead of String.
Readers: Renamed StringReader -> TextReader.
Updated tests.
API change.
Diffstat (limited to 'src/Text/Pandoc/Lua')
-rw-r--r-- | src/Text/Pandoc/Lua/PandocModule.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Lua/PandocModule.hs b/src/Text/Pandoc/Lua/PandocModule.hs index 8e0f3a5b4..27c19d4f0 100644 --- a/src/Text/Pandoc/Lua/PandocModule.hs +++ b/src/Text/Pandoc/Lua/PandocModule.hs @@ -30,6 +30,7 @@ module Text.Pandoc.Lua.PandocModule ( pushPandocModule ) where import Control.Monad (unless) import Data.ByteString.Char8 (unpack) import Data.Default (Default (..)) +import Data.Text (pack) import Scripting.Lua (LuaState, call, push, pushhsfunction, rawset) import Text.Pandoc.Class hiding (readDataFile) import Text.Pandoc.Definition (Pandoc) @@ -58,8 +59,8 @@ read_doc formatSpec content = do Left s -> return $ Left s Right reader -> case reader of - StringReader r -> do - res <- runIO $ r def content + TextReader r -> do + res <- runIO $ r def (pack content) case res of Left s -> return . Left $ show s Right pd -> return $ Right pd |