From 37830bff36b9344c11694d642bca9789f435dede Mon Sep 17 00:00:00 2001 From: panne Date: Mon, 2 Aug 2004 20:32:29 +0000 Subject: [haddock @ 2004-08-02 20:32:28 by panne] Nuked dead code --- src/Html.hs | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) (limited to 'src/Html.hs') diff --git a/src/Html.hs b/src/Html.hs index 59331cb2..a360814e 100644 --- a/src/Html.hs +++ b/src/Html.hs @@ -9,7 +9,7 @@ -- Stability : experimental -- Portability : portable -- --- $Id: Html.hs,v 1.5 2004/03/25 16:00:37 simonmar Exp $ +-- $Id: Html.hs,v 1.6 2004/08/02 20:32:29 panne Exp $ -- -- An Html combinator library -- @@ -962,10 +962,10 @@ gui act = form ! [action act,method "POST"] -- The output is quite messy, because space matters in -- HTML, so we must not generate needless spaces. -renderHtml :: (HTML html) => html -> Bool -> String -renderHtml theHtml pretty = +renderHtml :: (HTML html) => html -> String +renderHtml theHtml = renderMessage ++ - foldr (.) id (map (if pretty then renderHtml' 0 else unprettyHtml) + foldr (.) id (map unprettyHtml (getHtmlElements (tag "HTML" << theHtml))) "\n" renderMessage :: String @@ -973,22 +973,6 @@ renderMessage = "\n" ++ "\n" --- Warning: spaces matters in HTML. You are better using renderHtml. --- This is intentually very inefficent to "encorage" this, --- but the neater version in easier when debugging. - -renderHtml' :: Int -> HtmlElement -> ShowS -renderHtml' _ (HtmlString str) = (++) str -renderHtml' n (HtmlTag - { markupTag = name0, - markupContent = html, - markupAttrs = markupAttrs0 }) - = if isNoHtml html && elem name0 validHtmlITags - then renderTag True name0 markupAttrs0 n - else (renderTag True name0 markupAttrs0 n - . foldr (.) id (map (renderHtml' (n+2)) (getHtmlElements html)) - . renderTag False name0 [] n) - unprettyHtml :: HtmlElement -> ShowS unprettyHtml (HtmlString str) = (++) str unprettyHtml (HtmlTag -- cgit v1.2.3