summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/RTF.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2016-12-03 18:42:17 +0100
committerJohn MacFarlane <jgm@berkeley.edu>2017-01-25 17:07:40 +0100
commita4bd650277ac8fd2c952f2330e4d23a200d691a5 (patch)
tree9d6d202862b4f460669223dc0abd0e21b11ec7b4 /src/Text/Pandoc/Writers/RTF.hs
parent63dc6bd02509eb31d9d221c4e39f18af2b77fe6d (diff)
Class: rename addWarning[WithPos] to warning[WithPos].
There's already a function addWarning in Parsing! Maybe we can dispense with that now, but I still like 'warning' better as a name.
Diffstat (limited to 'src/Text/Pandoc/Writers/RTF.hs')
-rw-r--r--src/Text/Pandoc/Writers/RTF.hs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Text/Pandoc/Writers/RTF.hs b/src/Text/Pandoc/Writers/RTF.hs
index 32f70cb31..a3351a705 100644
--- a/src/Text/Pandoc/Writers/RTF.hs
+++ b/src/Text/Pandoc/Writers/RTF.hs
@@ -36,7 +36,7 @@ import Text.Pandoc.Writers.Shared
import Text.Pandoc.Writers.Math
import Text.Pandoc.Templates (renderTemplate')
import Text.Pandoc.Walk
-import Text.Pandoc.Class (addWarning)
+import Text.Pandoc.Class (warning)
import Data.List ( isSuffixOf, intercalate )
import Data.Char ( ord, chr, isDigit )
import qualified Data.ByteString as B
@@ -64,7 +64,7 @@ rtfEmbedImage opts x@(Image attr _ (src,_)) = do
_ -> throwError $ PandocSomeError "Unknown file type"
sizeSpec <- case imageSize imgdata of
Left msg -> do
- addWarning $ "Could not determine image size in `" ++
+ warning $ "Could not determine image size in `" ++
src ++ "': " ++ msg
return ""
Right sz -> return $ "\\picw" ++ show xpx ++
@@ -78,17 +78,17 @@ rtfEmbedImage opts x@(Image attr _ (src,_)) = do
concat bytes ++ "}"
if B.null imgdata
then do
- addWarning $ "Image " ++ src ++ " contained no data, skipping."
+ warning $ "Image " ++ src ++ " contained no data, skipping."
return x
else return $ RawInline (Format "rtf") raw
| otherwise -> do
- addWarning $ "Image " ++ src ++ " is not a jpeg or png, skipping."
+ warning $ "Image " ++ src ++ " is not a jpeg or png, skipping."
return x
Right (_, Nothing) -> do
- addWarning $ "Could not determine image type for " ++ src ++ ", skipping."
+ warning $ "Could not determine image type for " ++ src ++ ", skipping."
return x
Left e -> do
- addWarning $ "Could not fetch image " ++ src ++ "\n" ++ show e
+ warning $ "Could not fetch image " ++ src ++ "\n" ++ show e
return x
rtfEmbedImage _ x = return x