git.iko.soy/typeable/pandoc
on master help sign in
Fix trypandoc for Text changes.
e19ce31John MacFarlane
trypandoc/trypandoc.hs+4−4
@@ -41,12 +41,12 @@ app req respond = do
41 text <- getParam "text" >>= checkLength . fromMaybe T.empty
41 text <- getParam "text" >>= checkLength . fromMaybe T.empty
42 fromFormat <- fromMaybe "" <$> getParam "from"
42 fromFormat <- fromMaybe "" <$> getParam "from"
43 toFormat <- fromMaybe "" <$> getParam "to"
43 toFormat <- fromMaybe "" <$> getParam "to"
44− let reader = case runPure $ getReader (T.unpack fromFormat) of
44+ let reader = case runPure $ getReader fromFormat of
45 Right (TextReader r, es) -> r readerOpts{
45 Right (TextReader r, es) -> r readerOpts{
46 readerExtensions = es }
46 readerExtensions = es }
47 _ -> error $ "could not find reader for "
47 _ -> error $ "could not find reader for "
48 ++ T.unpack fromFormat
48 ++ T.unpack fromFormat
49− let writer = case runPure $ getWriter (T.unpack toFormat) of
49+ let writer = case runPure $ getWriter toFormat of
50 Right (TextWriter w, es) -> w writerOpts{
50 Right (TextWriter w, es) -> w writerOpts{
51 writerExtensions = es }
51 writerExtensions = es }
52 _ -> error $ "could not find writer for " ++
52 _ -> error $ "could not find writer for " ++
@@ -71,8 +71,8 @@ checkLength t =
71writerOpts :: WriterOptions
71writerOpts :: WriterOptions
72writerOpts = def { writerReferenceLinks = True,
72writerOpts = def { writerReferenceLinks = True,
73 writerEmailObfuscation = NoObfuscation,
73 writerEmailObfuscation = NoObfuscation,
74− writerHTMLMathMethod = MathJax (defaultMathJaxURL ++
74+ writerHTMLMathMethod = MathJax (defaultMathJaxURL <>
75− "tex-mml-chtml.js"),
75+ T.pack "tex-mml-chtml.js"),
76 writerHighlightStyle = Just pygments }
76 writerHighlightStyle = Just pygments }
77
77
78readerOpts :: ReaderOptions
78readerOpts :: ReaderOptions