From f7525573cd1964a6a4fff3c92b737f0ee7d3621c Mon Sep 17 00:00:00 2001 From: Neil Mitchell Date: Thu, 26 Jun 2008 15:09:54 +0000 Subject: Remove any white space around a
  • element --- src/Haddock/Backends/Hoogle.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/Haddock') diff --git a/src/Haddock/Backends/Hoogle.hs b/src/Haddock/Backends/Hoogle.hs index 2cfdcf64..14594569 100644 --- a/src/Haddock/Backends/Hoogle.hs +++ b/src/Haddock/Backends/Hoogle.hs @@ -207,9 +207,11 @@ showInline = unwordsWrap 70 . words . concatMap f where fs = concatMap f f (Str x) = escape x - f (TagInline s xs) = "<"++s++">" ++ fs xs ++ "" + f (TagInline s xs) = "<"++s++">" ++ (if s == "li" then trim else id) (fs xs) ++ "" f x = fs $ asInline x + trim = dropWhile isSpace . reverse . dropWhile isSpace . reverse + showPre :: [Tag] -> [String] showPre = trimFront . trimLines . lines . concatMap f -- cgit v1.2.3