summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Logging.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-11-04 17:07:55 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2017-11-04 17:07:55 -0700
commit8e8d7802eef373b458653fc87857672c2c376b05 (patch)
tree95b2d7a4b81ffab0ce21402f8cd122936dd1ce1b /src/Text/Pandoc/Logging.hs
parent5087b05df47272658cbb318ea3c5ea079170255d (diff)
Logging: issue INFO, not WARNING, if LaTeX .sty file can't be read.
Normally this is not a situation requiring a fix from the user, so a warning is inappropriate.
Diffstat (limited to 'src/Text/Pandoc/Logging.hs')
-rw-r--r--src/Text/Pandoc/Logging.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Logging.hs b/src/Text/Pandoc/Logging.hs
index 7f4ae2ada..016e64f6c 100644
--- a/src/Text/Pandoc/Logging.hs
+++ b/src/Text/Pandoc/Logging.hs
@@ -45,6 +45,7 @@ import Data.Aeson.Encode.Pretty (Config (..), defConfig, encodePretty',
keyOrder)
import qualified Data.ByteString.Lazy as BL
import Data.Data (Data, toConstr)
+import Data.List (isSuffixOf)
import qualified Data.Text as Text
import Data.Typeable (Typeable)
import GHC.Generics (Generic)
@@ -315,7 +316,9 @@ messageVerbosity msg =
ReferenceNotFound{} -> WARNING
CircularReference{} -> WARNING
UndefinedToggle{} -> WARNING
- CouldNotLoadIncludeFile{} -> WARNING
+ CouldNotLoadIncludeFile f _
+ | ".sty" `isSuffixOf` f -> INFO
+ | otherwise -> WARNING
MacroAlreadyDefined{} -> WARNING
ParsingUnescaped{} -> INFO
InlineNotRendered{} -> INFO