summaryrefslogtreecommitdiff
path: root/pandoc.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-04-27 21:01:30 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2014-04-27 21:01:30 -0700
commit5dfeb5d52f92083bb37dd56bd0711aa0c93e9361 (patch)
treef8f9061bf22f6460e72e3407928746f24b0958ff /pandoc.hs
parentc8f97d3d418f929a1f499a9ef37c17d71f282d45 (diff)
Allow html4 as synonym of html as reader.
It already worked for writer.
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