From 9ff8bc64f9c873e2bcae6a1a46f71af9287d6753 Mon Sep 17 00:00:00 2001 From: Alexander Krotov Date: Mon, 29 Jan 2018 23:27:40 +0300 Subject: Muse writer: don't wrap displayMath into is a block tag and displayMath is an inline element. Writing around displayMath could result in nested tags. --- src/Text/Pandoc/Writers/Muse.hs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/Text/Pandoc/Writers/Muse.hs') diff --git a/src/Text/Pandoc/Writers/Muse.hs b/src/Text/Pandoc/Writers/Muse.hs index 73d79a9a2..c3c1c3120 100644 --- a/src/Text/Pandoc/Writers/Muse.hs +++ b/src/Text/Pandoc/Writers/Muse.hs @@ -363,11 +363,8 @@ inlineToMuse (Quoted DoubleQuote lst) = do inlineToMuse (Cite _ lst) = inlineListToMuse lst inlineToMuse (Code _ str) = return $ "" <> text (substitute "" "</code>" str) <> "" -inlineToMuse (Math InlineMath str) = - lift (texMathToInlines InlineMath str) >>= inlineListToMuse -inlineToMuse (Math DisplayMath str) = do - contents <- lift (texMathToInlines DisplayMath str) >>= inlineListToMuse - return $ "" <> contents <> "" <> blankline +inlineToMuse (Math t str) = + lift (texMathToInlines t str) >>= inlineListToMuse inlineToMuse (RawInline (Format f) str) = return $ " text f <> "\">" <> text str <> "" inlineToMuse LineBreak = return $ "
" <> cr -- cgit v1.2.3