From 5dfeb5d52f92083bb37dd56bd0711aa0c93e9361 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sun, 27 Apr 2014 21:01:30 -0700 Subject: Allow html4 as synonym of html as reader. It already worked for writer. --- pandoc.hs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'pandoc.hs') 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 -- cgit v1.2.3