aboutsummaryrefslogtreecommitdiff
path: root/trypandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2019-11-22 09:45:10 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2019-11-22 09:45:10 -0800
commite19ce3163943a73d3fdc4f63e1e0183cbd9efa13 (patch)
treea78b43a8d718e55fe00b06043515e466f100df61 /trypandoc
parent415ddbe228fe3da1a8472e589f1ebd26a66332a2 (diff)
downloadpandoc-e19ce3163943a73d3fdc4f63e1e0183cbd9efa13.tar.gz
Fix trypandoc for Text changes.
Diffstat (limited to 'trypandoc')
-rw-r--r--trypandoc/trypandoc.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/trypandoc/trypandoc.hs b/trypandoc/trypandoc.hs
index b00d66d0d..be8422d66 100644
--- a/trypandoc/trypandoc.hs
+++ b/trypandoc/trypandoc.hs
@@ -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 runPure $ getReader (T.unpack fromFormat) of
+ let reader = case runPure $ getReader fromFormat of
Right (TextReader r, es) -> r readerOpts{
readerExtensions = es }
_ -> error $ "could not find reader for "
++ T.unpack fromFormat
- let writer = case runPure $ getWriter (T.unpack toFormat) of
+ let writer = case runPure $ getWriter toFormat of
Right (TextWriter w, es) -> w writerOpts{
writerExtensions = es }
_ -> error $ "could not find writer for " ++
@@ -71,8 +71,8 @@ checkLength t =
writerOpts :: WriterOptions
writerOpts = def { writerReferenceLinks = True,
writerEmailObfuscation = NoObfuscation,
- writerHTMLMathMethod = MathJax (defaultMathJaxURL ++
- "tex-mml-chtml.js"),
+ writerHTMLMathMethod = MathJax (defaultMathJaxURL <>
+ T.pack "tex-mml-chtml.js"),
writerHighlightStyle = Just pygments }
readerOpts :: ReaderOptions