parent
4ee92dce0c
commit
fa0f73aef9
1 changed files with 2 additions and 1 deletions
|
@ -37,6 +37,7 @@ import Data.Char ( toLower )
|
|||
import Scripting.Lua (LuaState, StackValue, callfunc)
|
||||
import qualified Scripting.Lua as Lua
|
||||
import Text.Pandoc.UTF8 (fromString, toString)
|
||||
import qualified Text.Pandoc.UTF8 as UTF8
|
||||
import Data.ByteString (ByteString)
|
||||
import qualified Data.ByteString.Char8 as C8
|
||||
import Data.Monoid
|
||||
|
@ -131,7 +132,7 @@ instance StackValue MetaValue where
|
|||
-- | Convert Pandoc to custom markup.
|
||||
writeCustom :: FilePath -> WriterOptions -> Pandoc -> IO String
|
||||
writeCustom luaFile opts doc = do
|
||||
luaScript <- readFile luaFile
|
||||
luaScript <- UTF8.readFile luaFile
|
||||
lua <- Lua.newstate
|
||||
Lua.openlibs lua
|
||||
Lua.loadstring lua luaScript "custom"
|
||||
|
|
Loading…
Reference in a new issue