summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2015-08-03 23:13:32 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2015-08-03 23:13:32 +0200
commitd5582299c7704cd94419997af6d9bd2aa0701045 (patch)
tree2e05b9ba1b8f513d7abfe385e17f6e6ac26aaca8
parent6bf99d8fd6c056c165e0c4b0421c0feeb773ff0f (diff)
downloaddirty-haskell.org-d5582299c7704cd94419997af6d9bd2aa0701045.tar
dirty-haskell.org-d5582299c7704cd94419997af6d9bd2aa0701045.tar.gz
dirty-haskell.org-d5582299c7704cd94419997af6d9bd2aa0701045.tar.bz2
dirty-haskell.org-d5582299c7704cd94419997af6d9bd2aa0701045.tar.xz
dirty-haskell.org-d5582299c7704cd94419997af6d9bd2aa0701045.zip
hlint
-rw-r--r--src/Site.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Site.hs b/src/Site.hs
index 1facff6..e9f186f 100644
--- a/src/Site.hs
+++ b/src/Site.hs
@@ -104,7 +104,7 @@ renderTag tag tags = do
104 then pure (error $ unwords ["no string value for bool field:",name]) 104 then pure (error $ unwords ["no string value for bool field:",name])
105 else empty) 105 else empty)
106 withEllipsis ellipsisItem xs 106 withEllipsis ellipsisItem xs
107 | length xs > max = [ellipsisItem] ++ takeEnd (max - 1) xs 107 | length xs > max = ellipsisItem : takeEnd (max - 1) xs
108 | otherwise = xs 108 | otherwise = xs
109 takeEnd i = reverse . take i . reverse 109 takeEnd i = reverse . take i . reverse
110 max = 4 110 max = 4
@@ -116,7 +116,7 @@ tagTranslation :: String -> String
116tagTranslation = mapMaybe charTrans 116tagTranslation = mapMaybe charTrans
117 where 117 where
118 charTrans c 118 charTrans c
119 | isSpace c = Just $ '-' 119 | isSpace c = Just '-'
120 | isAlphaNum c = Just $ toLower c 120 | isAlphaNum c = Just $ toLower c
121 | otherwise = Nothing 121 | otherwise = Nothing
122 122