summaryrefslogtreecommitdiff
path: root/src/Text/Hakyll/Util.hs
diff options
context:
space:
mode:
authorJasper Van der Jeugt <jaspervdj@gmail.com>2010-01-11 13:56:32 +0100
committerJasper Van der Jeugt <jaspervdj@gmail.com>2010-01-11 13:56:32 +0100
commitdae0258a62a714fb7fd9b47473bf259eb858f9f1 (patch)
treede6c4480cbd87ec9e8689dcdbefeee5618c8a3ef /src/Text/Hakyll/Util.hs
parent7a765f29a2f5dcf753e5418c96a9c40ddb9112be (diff)
downloadhakyll-dae0258a62a714fb7fd9b47473bf259eb858f9f1.tar.gz
Readability++.
Diffstat (limited to 'src/Text/Hakyll/Util.hs')
-rw-r--r--src/Text/Hakyll/Util.hs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Text/Hakyll/Util.hs b/src/Text/Hakyll/Util.hs
index 018c404..858b3fb 100644
--- a/src/Text/Hakyll/Util.hs
+++ b/src/Text/Hakyll/Util.hs
@@ -9,7 +9,8 @@ import Data.Char (isSpace)
-- | Trim a string (drop spaces and tabs at both sides).
trim :: String -> String
trim = reverse . trim' . reverse . trim'
- where trim' = dropWhile isSpace
+ where
+ trim' = dropWhile isSpace
-- | Strip html tags.
stripHTML :: String -> String
@@ -18,8 +19,9 @@ stripHTML str = let (beforeTag, rest) = break (== '<') str
(_, afterTag) = break (== '>') rest
in beforeTag ++ (stripHTML $ tail' afterTag)
-- We need a failsafe tail function.
- where tail' [] = []
- tail' xs = tail xs
+ where
+ tail' [] = []
+ tail' xs = tail xs
-- | Make a HTML link.
--