From c0c10eda300fa1ecc0c9a8a3fff01c3ba3a4883b Mon Sep 17 00:00:00 2001 From: David Waern Date: Mon, 6 Dec 2010 14:17:29 +0000 Subject: Add a flag --pretty-html for rendering indented html with newlines --- src/Main.hs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/Main.hs') diff --git a/src/Main.hs b/src/Main.hs index 472f56b7..9d056efe 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -30,7 +30,7 @@ import Haddock.Version import Haddock.InterfaceFile import Haddock.Options import Haddock.Utils -import Haddock.GhcUtils +import Haddock.GhcUtils hiding (pretty) import Control.Monad import Control.Exception @@ -190,6 +190,7 @@ render flags ifaces installedIfaces srcMap = do let title = fromMaybe "" (optTitle flags) unicode = Flag_UseUnicode `elem` flags + pretty = Flag_PrettyHtml `elem` flags opt_wiki_urls = wikiUrls flags opt_contents_url = optContentsUrl flags opt_index_url = optIndexUrl flags @@ -219,13 +220,13 @@ render flags ifaces installedIfaces srcMap = do when (Flag_GenIndex `elem` flags) $ do ppHtmlIndex odir title pkgStr themes opt_contents_url sourceUrls' opt_wiki_urls - allVisibleIfaces + allVisibleIfaces pretty copyHtmlBits odir libDir themes when (Flag_GenContents `elem` flags) $ do ppHtmlContents odir title pkgStr themes opt_index_url sourceUrls' opt_wiki_urls - allVisibleIfaces True prologue + allVisibleIfaces True prologue pretty copyHtmlBits odir libDir themes when (Flag_Html `elem` flags) $ do @@ -233,6 +234,7 @@ render flags ifaces installedIfaces srcMap = do prologue themes sourceUrls' opt_wiki_urls opt_contents_url opt_index_url unicode opt_qualification + pretty copyHtmlBits odir libDir themes when (Flag_Hoogle `elem` flags) $ do -- cgit v1.2.3