From 8e8d7802eef373b458653fc87857672c2c376b05 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 4 Nov 2017 17:07:55 -0700 Subject: [PATCH] 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. --- changelog | 4 ++++ src/Text/Pandoc/Logging.hs | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/changelog b/changelog index d822fbb63..f1edc71be 100644 --- a/changelog +++ b/changelog @@ -46,6 +46,10 @@ pandoc (2.0.1.1) * Improve `pandoc-template-mode.el` (Vaclav Haisman). + * Issue INFO, not WARNING, when a .sty file cannot be + read in LaTeX reader. It is normally not an issue requiring + a fix from the user if .sty files are not found. + * INSTALL.md: MacOS instructions needed xar -f (adam234). * MANUAL.txt: 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