Fix trypandoc with getReader/getWriter changes.
This commit is contained in:
parent
ebea74dc35
commit
36a2df1d35
1 changed files with 2 additions and 2 deletions
|
@ -41,12 +41,12 @@ app req respond = do
|
|||
text <- getParam "text" >>= checkLength . fromMaybe T.empty
|
||||
fromFormat <- fromMaybe "" <$> getParam "from"
|
||||
toFormat <- fromMaybe "" <$> getParam "to"
|
||||
let reader = case getReader (T.unpack fromFormat) of
|
||||
let reader = case runPure $ getReader (T.unpack fromFormat) of
|
||||
Right (TextReader r, es) -> r readerOpts{
|
||||
readerExtensions = es }
|
||||
_ -> error $ "could not find reader for "
|
||||
++ T.unpack fromFormat
|
||||
let writer = case getWriter (T.unpack toFormat) of
|
||||
let writer = case runPure $ getWriter (T.unpack toFormat) of
|
||||
Right (TextWriter w, es) -> w writerOpts{
|
||||
writerExtensions = es }
|
||||
_ -> error $ "could not find writer for " ++
|
||||
|
|
Loading…
Add table
Reference in a new issue