summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/Math.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-02-10 23:59:47 +0100
committerJohn MacFarlane <jgm@berkeley.edu>2017-02-11 00:14:44 +0100
commit76c55466d3087224eccdc47c804ab2904be50df5 (patch)
tree8e605c9a6ab89569d8b51898f31487ac0c005a22 /src/Text/Pandoc/Writers/Math.hs
parent8ad7e2c21fd00d8225c5f243bf3383c956b6c83b (diff)
Use new warnings throughout the code base.
Diffstat (limited to 'src/Text/Pandoc/Writers/Math.hs')
-rw-r--r--src/Text/Pandoc/Writers/Math.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Writers/Math.hs b/src/Text/Pandoc/Writers/Math.hs
index b959ce972..b7419ddf9 100644
--- a/src/Text/Pandoc/Writers/Math.hs
+++ b/src/Text/Pandoc/Writers/Math.hs
@@ -6,6 +6,7 @@ where
import Text.Pandoc.Class
import Text.Pandoc.Definition
+import Text.Pandoc.Logging
import Text.TeXMath (Exp, writePandoc, DisplayType(..), readTeX)
-- | Converts a raw TeX math formula to a list of 'Pandoc' inlines.
@@ -20,7 +21,7 @@ texMathToInlines mt inp = do
case res of
Right (Just ils) -> return ils
Right (Nothing) -> do
- warning $ "Could not render TeX math as unicode, rendering as raw TeX:\n" ++ inp
+ report $ CouldNotConvertTeXMath inp ""
return [mkFallback mt inp]
Left il -> return [il]
@@ -40,8 +41,7 @@ convertMath writer mt str = do
case writer dt <$> readTeX str of
Right r -> return (Right r)
Left e -> do
- warning $ "Could not convert TeX math, rendering as raw TeX:\n" ++
- str ++ "\n" ++ e
+ report $ CouldNotConvertTeXMath str e
return (Left $ mkFallback mt str)
where dt = case mt of
DisplayMath -> DisplayBlock