git.iko.soy/typeable/pandoc
on master help sign in
Fix trypandoc for Text changes.
commite19ce3163943a73d3fdc4f63e1e0183cbd9efa13 authorJohn MacFarlane <jgm@berkeley.edu> dateFri 22 Nov 2019, 09:45 (7 years ago) parent415ddbe
1 file changed+4−4
trypandoc/trypandoc.hs+4−4
trypandoc/trypandoc.hs+4−4
@@ -41,12 +41,12 @@ app req respond = do
4141 text <- getParam "text" >>= checkLength . fromMaybe T.empty
4242 fromFormat <- fromMaybe "" <$> getParam "from"
4343 toFormat <- fromMaybe "" <$> getParam "to"
44− let reader = case runPure $ getReader (T.unpack fromFormat) of
44+ let reader = case runPure $ getReader fromFormat of
4545 Right (TextReader r, es) -> r readerOpts{
4646 readerExtensions = es }
4747 _ -> error $ "could not find reader for "
4848 ++ T.unpack fromFormat
49− let writer = case runPure $ getWriter (T.unpack toFormat) of
49+ let writer = case runPure $ getWriter toFormat of
5050 Right (TextWriter w, es) -> w writerOpts{
5151 writerExtensions = es }
5252 _ -> error $ "could not find writer for " ++
@@ -71,8 +71,8 @@ checkLength t =
7171writerOpts :: WriterOptions
7272writerOpts = def { writerReferenceLinks = True,
7373 writerEmailObfuscation = NoObfuscation,
74− writerHTMLMathMethod = MathJax (defaultMathJaxURL ++
75− "tex-mml-chtml.js"),
74+ writerHTMLMathMethod = MathJax (defaultMathJaxURL <>
75+ T.pack "tex-mml-chtml.js"),
7676 writerHighlightStyle = Just pygments }
7777
7878readerOpts :: ReaderOptions