Skip to content

Commit c695975

Browse files
committed
Fix compilation issue
steindani#13 (comment)
1 parent 80515b9 commit c695975

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

IncludeFilter.hs

+3-5
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ example, if the header is incremented by 1, the title is inserted as a level 1 h
6969

7070
import Control.Monad
7171
import Data.List
72+
import Data.Text.IO (readFile)
7273
import qualified Data.Char as C
7374
import qualified Data.Map as Map
7475
import Control.Error (readMay, fromMaybe)
@@ -103,13 +104,10 @@ modifyHeaderLevelBlockWith _ x = x
103104
modifyHeaderLevelWith :: Int -> Pandoc -> Pandoc
104105
modifyHeaderLevelWith n = walk (modifyHeaderLevelBlockWith n)
105106

106-
ioReadMarkdown :: String -> IO(Either PandocError Pandoc)
107-
ioReadMarkdown content = return $! readMarkdown def content
108-
109107
getContent :: Int -> String -> IO [Block]
110108
getContent changeInHeaderLevel file = do
111-
c <- readFile file
112-
p <- ioReadMarkdown c
109+
c <- Data.Text.IO.readFile file
110+
p <- runIO $ readMarkdown def c
113111
return $! stripPandoc changeInHeaderLevel p
114112

115113
getProcessableFileList :: String -> IO [String]

0 commit comments

Comments
 (0)