aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/App.hs2
-rw-r--r--src/Text/Pandoc/App/OutputSettings.hs2
-rw-r--r--src/Text/Pandoc/Logging.hs8
3 files changed, 6 insertions, 6 deletions
diff --git a/src/Text/Pandoc/App.hs b/src/Text/Pandoc/App.hs
index 12f5de537..8bdf12b69 100644
--- a/src/Text/Pandoc/App.hs
+++ b/src/Text/Pandoc/App.hs
@@ -141,7 +141,7 @@ convertWithOpts opts = do
Nothing | sources == ["-"] -> return "markdown"
| any isURI sources -> return "html"
| otherwise -> do
- report $ UnknownExtensions
+ report $ CouldNotDeduceFormat
(map takeExtension sources) "markdown"
return "markdown"
diff --git a/src/Text/Pandoc/App/OutputSettings.hs b/src/Text/Pandoc/App/OutputSettings.hs
index ae78ba15e..744f4591f 100644
--- a/src/Text/Pandoc/App/OutputSettings.hs
+++ b/src/Text/Pandoc/App/OutputSettings.hs
@@ -75,7 +75,7 @@ optToOutputSettings opts = do
| otherwise ->
case formatFromFilePaths [outputFile] of
Nothing -> do
- report $ UnknownExtensions
+ report $ CouldNotDeduceFormat
[takeExtension outputFile] "html"
return ("html", Nothing)
Just f -> return (f, Nothing)
diff --git a/src/Text/Pandoc/Logging.hs b/src/Text/Pandoc/Logging.hs
index 1178df1b3..fad236dd3 100644
--- a/src/Text/Pandoc/Logging.hs
+++ b/src/Text/Pandoc/Logging.hs
@@ -89,7 +89,7 @@ data LogMessage =
| UnusualConversion String
| UnexpectedXmlElement String String
| UnknownOrgExportOption String
- | UnknownExtensions [String] String
+ | CouldNotDeduceFormat [String] String
deriving (Show, Eq, Data, Ord, Typeable, Generic)
instance ToJSON LogMessage where
@@ -211,7 +211,7 @@ instance ToJSON LogMessage where
"parent" .= Text.pack parent]
UnknownOrgExportOption option ->
["option" .= Text.pack option]
- UnknownExtensions exts format ->
+ CouldNotDeduceFormat exts format ->
["extensions" .= map Text.pack exts
,"format" .= Text.pack format]
@@ -319,7 +319,7 @@ showLogMessage msg =
"Unexpected XML element " ++ element ++ " in " ++ parent
UnknownOrgExportOption option ->
"Ignoring unknown Org export option: " ++ option
- UnknownExtensions exts format ->
+ CouldNotDeduceFormat exts format ->
"Could not deduce format from file extension " ++
intercalate " or " exts ++ "\n" ++
"Defaulting to " ++ format
@@ -365,4 +365,4 @@ messageVerbosity msg =
UnusualConversion {} -> WARNING
UnexpectedXmlElement {} -> WARNING
UnknownOrgExportOption {} -> WARNING
- UnknownExtensions{} -> WARNING
+ CouldNotDeduceFormat{} -> WARNING