diff options
author | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2010-01-23 18:20:10 +0100 |
---|---|---|
committer | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2010-01-23 18:20:10 +0100 |
commit | 6c94ad79926d9808ad1817d06c7e9aa69679318f (patch) | |
tree | 5a7aba54028217caff580a3622fe3ec1b2818c8f /src/Text/Hakyll/Util.hs | |
parent | 5f8ea066d6626d9c1a1caa028f62865d74ce0d8a (diff) | |
download | hakyll-6c94ad79926d9808ad1817d06c7e9aa69679318f.tar.gz |
Documentation++.
Diffstat (limited to 'src/Text/Hakyll/Util.hs')
-rw-r--r-- | src/Text/Hakyll/Util.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Text/Hakyll/Util.hs b/src/Text/Hakyll/Util.hs index 8c33512..5105a31 100644 --- a/src/Text/Hakyll/Util.hs +++ b/src/Text/Hakyll/Util.hs @@ -6,20 +6,20 @@ module Text.Hakyll.Util import Data.Char (isSpace) --- | Trim a string (drop spaces and tabs at both sides). +-- | Trim a string (drop spaces, tabs and newlines at both sides). trim :: String -> String trim = reverse . trim' . reverse . trim' where trim' = dropWhile isSpace --- | Strip html tags. +-- | Strip html tags from the given string. stripHTML :: String -> String stripHTML [] = [] stripHTML str = let (beforeTag, rest) = break (== '<') str (_, afterTag) = break (== '>') rest in beforeTag ++ stripHTML (tail' afterTag) - -- We need a failsafe tail function. where + -- We need a failsafe tail function. tail' [] = [] tail' xs = tail xs |