From cdb01e6d54aace50ead88964a7182c5b9e1126a4 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Thu, 29 Dec 2011 13:39:03 -0800 Subject: Made `html5` and `html5+lhs` output formats. Deprecated the `--html5`/`-5` flag. Use the output format instead. --- src/Text/Pandoc.hs | 5 +++++ src/pandoc.hs | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Text/Pandoc.hs b/src/Text/Pandoc.hs index ee5a951eb..e3c029992 100644 --- a/src/Text/Pandoc.hs +++ b/src/Text/Pandoc.hs @@ -171,8 +171,13 @@ writers :: [ ( String, WriterOptions -> Pandoc -> String ) ] writers = [("native" , writeNative) ,("json" , \_ -> encodeJSON) ,("html" , writeHtmlString) + ,("html5" , \o -> + writeHtmlString o{ writerHtml5 = True }) ,("html+lhs" , \o -> writeHtmlString o{ writerLiterateHaskell = True }) + ,("html5+lhs" , \o -> + writeHtmlString o{ writerLiterateHaskell = True, + writerHtml5 = True }) ,("s5" , writeHtmlString) ,("slidy" , writeHtmlString) ,("dzslides" , writeHtmlString) diff --git a/src/pandoc.hs b/src/pandoc.hs index 2aeebdbcf..e55875c69 100644 --- a/src/pandoc.hs +++ b/src/pandoc.hs @@ -244,7 +244,10 @@ options = , Option "5" ["html5"] (NoArg - (\opt -> return opt { optHtml5 = True })) + (\opt -> do + UTF8.hPutStrLn stderr $ "pandoc: --html5 is deprecated. " + ++ "Use the html5 output format instead." + return opt { optHtml5 = True })) "" -- "Produce HTML5 in HTML output" , Option "" ["no-highlight"] -- cgit v1.2.3