diff options
author | Neil Mitchell <unknown> | 2008-06-26 15:09:54 +0000 |
---|---|---|
committer | Neil Mitchell <unknown> | 2008-06-26 15:09:54 +0000 |
commit | f7525573cd1964a6a4fff3c92b737f0ee7d3621c (patch) | |
tree | dea39d8dca351eaab0e1af3a1fa61b477a36fae7 /src/Haddock/Backends | |
parent | 14c67ac66abf15a623d0f1d14cf5d20462859ebe (diff) |
Remove any white space around a <li> element
Diffstat (limited to 'src/Haddock/Backends')
-rw-r--r-- | src/Haddock/Backends/Hoogle.hs | 4 |
1 files changed, 3 insertions, 1 deletions
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 ++ "</"++s++">" + f (TagInline s xs) = "<"++s++">" ++ (if s == "li" then trim else id) (fs xs) ++ "</"++s++">" f x = fs $ asInline x + trim = dropWhile isSpace . reverse . dropWhile isSpace . reverse + showPre :: [Tag] -> [String] showPre = trimFront . trimLines . lines . concatMap f |