From 40d8100d440dd7924068d027e052f5a3de65e70f Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 4 Aug 2014 11:13:09 -0700 Subject: Use texmath 0.7 interface. --- src/Text/Pandoc/Readers/TeXMath.hs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/Text/Pandoc/Readers/TeXMath.hs') diff --git a/src/Text/Pandoc/Readers/TeXMath.hs b/src/Text/Pandoc/Readers/TeXMath.hs index d7f982fb7..3fee3051e 100644 --- a/src/Text/Pandoc/Readers/TeXMath.hs +++ b/src/Text/Pandoc/Readers/TeXMath.hs @@ -38,9 +38,10 @@ import Text.TeXMath texMathToInlines :: MathType -> String -- ^ String to parse (assumes @'\n'@ line endings) -> [Inline] -texMathToInlines mt inp = case texMathToPandoc dt inp of - Left _ -> [Str (delim ++ inp ++ delim)] - Right res -> res +texMathToInlines mt inp = + case writePandoc dt `fmap` readTeX inp of + Right (Just ils) -> ils + _ -> [Str (delim ++ inp ++ delim)] where (dt, delim) = case mt of DisplayMath -> (DisplayBlock, "$$") InlineMath -> (DisplayInline, "$") -- cgit v1.2.3