LogMessage: change UnknownExtension -> CouldNotDeduceFormat
This commit is contained in:
parent
d98dde07c9
commit
7d6783006a
3 changed files with 6 additions and 6 deletions
|
@ -141,7 +141,7 @@ convertWithOpts opts = do
|
||||||
Nothing | sources == ["-"] -> return "markdown"
|
Nothing | sources == ["-"] -> return "markdown"
|
||||||
| any isURI sources -> return "html"
|
| any isURI sources -> return "html"
|
||||||
| otherwise -> do
|
| otherwise -> do
|
||||||
report $ UnknownExtensions
|
report $ CouldNotDeduceFormat
|
||||||
(map takeExtension sources) "markdown"
|
(map takeExtension sources) "markdown"
|
||||||
return "markdown"
|
return "markdown"
|
||||||
|
|
||||||
|
|
|
@ -75,7 +75,7 @@ optToOutputSettings opts = do
|
||||||
| otherwise ->
|
| otherwise ->
|
||||||
case formatFromFilePaths [outputFile] of
|
case formatFromFilePaths [outputFile] of
|
||||||
Nothing -> do
|
Nothing -> do
|
||||||
report $ UnknownExtensions
|
report $ CouldNotDeduceFormat
|
||||||
[takeExtension outputFile] "html"
|
[takeExtension outputFile] "html"
|
||||||
return ("html", Nothing)
|
return ("html", Nothing)
|
||||||
Just f -> return (f, Nothing)
|
Just f -> return (f, Nothing)
|
||||||
|
|
|
@ -89,7 +89,7 @@ data LogMessage =
|
||||||
| UnusualConversion String
|
| UnusualConversion String
|
||||||
| UnexpectedXmlElement String String
|
| UnexpectedXmlElement String String
|
||||||
| UnknownOrgExportOption String
|
| UnknownOrgExportOption String
|
||||||
| UnknownExtensions [String] String
|
| CouldNotDeduceFormat [String] String
|
||||||
deriving (Show, Eq, Data, Ord, Typeable, Generic)
|
deriving (Show, Eq, Data, Ord, Typeable, Generic)
|
||||||
|
|
||||||
instance ToJSON LogMessage where
|
instance ToJSON LogMessage where
|
||||||
|
@ -211,7 +211,7 @@ instance ToJSON LogMessage where
|
||||||
"parent" .= Text.pack parent]
|
"parent" .= Text.pack parent]
|
||||||
UnknownOrgExportOption option ->
|
UnknownOrgExportOption option ->
|
||||||
["option" .= Text.pack option]
|
["option" .= Text.pack option]
|
||||||
UnknownExtensions exts format ->
|
CouldNotDeduceFormat exts format ->
|
||||||
["extensions" .= map Text.pack exts
|
["extensions" .= map Text.pack exts
|
||||||
,"format" .= Text.pack format]
|
,"format" .= Text.pack format]
|
||||||
|
|
||||||
|
@ -319,7 +319,7 @@ showLogMessage msg =
|
||||||
"Unexpected XML element " ++ element ++ " in " ++ parent
|
"Unexpected XML element " ++ element ++ " in " ++ parent
|
||||||
UnknownOrgExportOption option ->
|
UnknownOrgExportOption option ->
|
||||||
"Ignoring unknown Org export option: " ++ option
|
"Ignoring unknown Org export option: " ++ option
|
||||||
UnknownExtensions exts format ->
|
CouldNotDeduceFormat exts format ->
|
||||||
"Could not deduce format from file extension " ++
|
"Could not deduce format from file extension " ++
|
||||||
intercalate " or " exts ++ "\n" ++
|
intercalate " or " exts ++ "\n" ++
|
||||||
"Defaulting to " ++ format
|
"Defaulting to " ++ format
|
||||||
|
@ -365,4 +365,4 @@ messageVerbosity msg =
|
||||||
UnusualConversion {} -> WARNING
|
UnusualConversion {} -> WARNING
|
||||||
UnexpectedXmlElement {} -> WARNING
|
UnexpectedXmlElement {} -> WARNING
|
||||||
UnknownOrgExportOption {} -> WARNING
|
UnknownOrgExportOption {} -> WARNING
|
||||||
UnknownExtensions{} -> WARNING
|
CouldNotDeduceFormat{} -> WARNING
|
||||||
|
|
Loading…
Add table
Reference in a new issue