aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Backends/Xhtml
diff options
context:
space:
mode:
authorDavid Waern <david.waern@gmail.com>2010-12-06 14:17:29 +0000
committerDavid Waern <david.waern@gmail.com>2010-12-06 14:17:29 +0000
commitc0c10eda300fa1ecc0c9a8a3fff01c3ba3a4883b (patch)
tree805a38cb60c5d6fd10fe16077768870389c6cf75 /src/Haddock/Backends/Xhtml
parent32eaf3a13f22ff4ecbce395874e2a86f96a96782 (diff)
Add a flag --pretty-html for rendering indented html with newlines
Diffstat (limited to 'src/Haddock/Backends/Xhtml')
-rw-r--r--src/Haddock/Backends/Xhtml/Utils.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Haddock/Backends/Xhtml/Utils.hs b/src/Haddock/Backends/Xhtml/Utils.hs
index 3fd461fd..c250f5eb 100644
--- a/src/Haddock/Backends/Xhtml/Utils.hs
+++ b/src/Haddock/Backends/Xhtml/Utils.hs
@@ -85,9 +85,10 @@ spliceURL maybe_file maybe_mod maybe_name maybe_loc url = run url
run (c:rest) = c : run rest
-renderToString :: Html -> String
-renderToString = showHtml -- for production
---renderToString = prettyHtml -- for debugging
+renderToString :: Bool -> Html -> String
+renderToString debug html
+ | debug = renderHtml html
+ | otherwise = showHtml html
hsep :: [Html] -> Html