@@ -200,7 +200,7 @@ pandocToMarkdown opts (Pandoc meta blocks) = do
200200 Nothing -> empty
201201 let headerBlocks = filter isHeaderBlock blocks
202202 toc <- if writerTableOfContents opts
203− then liftPandoc $ tableOfContents opts headerBlocks
203+ then tableOfContents opts headerBlocks
204204 else return empty
205205 -- Strip off final 'references' header if markdown citations enabled
206206 let blocks' = if isEnabled Ext_citations opts
@@ -533,7 +533,7 @@ blockToMarkdown' opts t@(Table caption aligns widths headers rows) = do
533533 rawHeaders rawRows
534534 | isEnabled Ext_raw_html opts -> fmap (id,) $
535535 text <$>
536− (liftPandoc $ writeHtmlString def $ Pandoc nullMeta [t])
536+ (writeHtmlString def $ Pandoc nullMeta [t])
537537 | otherwise -> return $ (id, text "[TABLE]")
538538 return $ nst $ tbl $$ blankline $$ caption'' $$ blankline
539539blockToMarkdown' opts (BulletList items) = do
@@ -985,7 +985,7 @@ inlineToMarkdown opts (Math InlineMath str) =
985985 return $ "\\\\(" <> text str <> "\\\\)"
986986 | otherwise -> do
987987 plain <- asks envPlain
988− (liftPandoc (texMathToInlines InlineMath str)) >>=
988+ texMathToInlines InlineMath str >>=
989989 inlineListToMarkdown opts .
990990 (if plain then makeMathPlainer else id)
991991inlineToMarkdown opts (Math DisplayMath str) =
@@ -1000,8 +1000,7 @@ inlineToMarkdown opts (Math DisplayMath str) =
10001000 | isEnabled Ext_tex_math_double_backslash opts ->
10011001 return $ "\\\\[" <> text str <> "\\\\]"
10021002 | otherwise -> (\x -> cr <> x <> cr) `fmap`
1003− (liftPandoc (texMathToInlines DisplayMath str) >>=
1004− inlineListToMarkdown opts)
1003+ texMathToInlines DisplayMath str >>= inlineListToMarkdown opts
10051004inlineToMarkdown opts (RawInline f str) = do
10061005 plain <- asks envPlain
10071006 if not plain &&
@@ -1063,7 +1062,7 @@ inlineToMarkdown opts lnk@(Link attr txt (src, tit))
10631062 | isEnabled Ext_raw_html opts &&
10641063 not (isEnabled Ext_link_attributes opts) &&
10651064 attr /= nullAttr = -- use raw HTML
1066− (text . trim) <$> (liftPandoc $ writeHtmlString def $ Pandoc nullMeta [Plain [lnk]])
1065+ (text . trim) <$> writeHtmlString def (Pandoc nullMeta [Plain [lnk]])
10671066 | otherwise = do
10681067 plain <- asks envPlain
10691068 linktext <- inlineListToMarkdown opts txt
@@ -1102,7 +1101,7 @@ inlineToMarkdown opts img@(Image attr alternate (source, tit))
11021101 | isEnabled Ext_raw_html opts &&
11031102 not (isEnabled Ext_link_attributes opts) &&
11041103 attr /= nullAttr = -- use raw HTML
1105− (text . trim) <$> (liftPandoc $ writeHtmlString def $ Pandoc nullMeta [Plain [img]])
1104+ (text . trim) <$> writeHtmlString def (Pandoc nullMeta [Plain [img]])
11061105 | otherwise = do
11071106 plain <- asks envPlain
11081107 let txt = if null alternate || alternate == [Str source]
@@ -1127,5 +1126,3 @@ makeMathPlainer = walk go
11271126 go (Emph xs) = Span nullAttr xs
11281127 go x = x
11291128
1130−liftPandoc :: PandocMonad m => m a -> MD m a
1131−liftPandoc = lift . lift