summaryrefslogtreecommitdiff
path: root/Main.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Main.hs')
-rw-r--r--Main.hs38
1 files changed, 20 insertions, 18 deletions
diff --git a/Main.hs b/Main.hs
index fbcb7dbf7..92ce87619 100644
--- a/Main.hs
+++ b/Main.hs
@@ -373,24 +373,26 @@ defaultWriterName :: FilePath -> String
defaultWriterName "-" = "html" -- no output file
defaultWriterName x =
case takeExtension (map toLower x) of
- "" -> "markdown" -- empty extension
- "tex" -> "latex"
- "latex" -> "latex"
- "ltx" -> "latex"
- "context" -> "context"
- "ctx" -> "context"
- "rtf" -> "rtf"
- "rst" -> "rst"
- "s5" -> "s5"
- "native" -> "native"
- "txt" -> "markdown"
- "text" -> "markdown"
- "md" -> "markdown"
- "markdown" -> "markdown"
- "db" -> "docbook"
- "xml" -> "docbook"
- "sgml" -> "docbook"
- [x] | x `elem` ['1'..'9'] -> "man"
+ "" -> "markdown" -- empty extension
+ ".tex" -> "latex"
+ ".latex" -> "latex"
+ ".ltx" -> "latex"
+ ".context" -> "context"
+ ".ctx" -> "context"
+ ".rtf" -> "rtf"
+ ".rst" -> "rst"
+ ".s5" -> "s5"
+ ".native" -> "native"
+ ".txt" -> "markdown"
+ ".text" -> "markdown"
+ ".md" -> "markdown"
+ ".markdown" -> "markdown"
+ ".texi" -> "texinfo"
+ ".texinfo" -> "texinfo"
+ ".db" -> "docbook"
+ ".xml" -> "docbook"
+ ".sgml" -> "docbook"
+ ['.',x] | x `elem` ['1'..'9'] -> "man"
_ -> "html"
main = do