aboutsummaryrefslogtreecommitdiff
path: root/pandoc.hs
diff options
context:
space:
mode:
Diffstat (limited to 'pandoc.hs')
-rw-r--r--pandoc.hs13
1 files changed, 7 insertions, 6 deletions
diff --git a/pandoc.hs b/pandoc.hs
index 93e1d4a76..959605625 100644
--- a/pandoc.hs
+++ b/pandoc.hs
@@ -1003,12 +1003,13 @@ main = do
Just _ -> return mbDataDir
-- assign reader and writer based on options and filenames
- let readerName' = if null readerName
- then let fallback = if any isURI sources
- then "html"
- else "markdown"
- in defaultReaderName fallback sources
- else map toLower readerName
+ let readerName' = case map toLower readerName of
+ [] -> defaultReaderName
+ (if any isURI sources
+ then "html"
+ else "markdown") sources
+ "html4" -> "html"
+ x -> x
let writerName' = case map toLower writerName of
[] -> defaultWriterName outputFile