diff options
-rw-r--r-- | src/Text/Pandoc/App/OutputSettings.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Text/Pandoc/App/OutputSettings.hs b/src/Text/Pandoc/App/OutputSettings.hs index a82c19bb6..b4bd9a4b2 100644 --- a/src/Text/Pandoc/App/OutputSettings.hs +++ b/src/Text/Pandoc/App/OutputSettings.hs @@ -91,8 +91,9 @@ optToOutputSettings opts = do return (formatFromFilePaths "html" [outputFile], Nothing) Just f -> return (f, Nothing) - let format = map toLower $ baseWriterName - $ takeFileName writerName -- in case path to lua script + let format = if ".lua" `isSuffixOf` writerName + then writerName + else map toLower $ baseWriterName writerName (writer, writerExts) <- if ".lua" `isSuffixOf` format |