summaryrefslogtreecommitdiff
path: root/src/Text/Hakyll/Util.hs
diff options
context:
space:
mode:
authorJasper Van der Jeugt <jaspervdj@gmail.com>2010-01-23 18:20:10 +0100
committerJasper Van der Jeugt <jaspervdj@gmail.com>2010-01-23 18:20:10 +0100
commit6c94ad79926d9808ad1817d06c7e9aa69679318f (patch)
tree5a7aba54028217caff580a3622fe3ec1b2818c8f /src/Text/Hakyll/Util.hs
parent5f8ea066d6626d9c1a1caa028f62865d74ce0d8a (diff)
downloadhakyll-6c94ad79926d9808ad1817d06c7e9aa69679318f.tar.gz
Documentation++.
Diffstat (limited to 'src/Text/Hakyll/Util.hs')
-rw-r--r--src/Text/Hakyll/Util.hs6
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