diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Site.hs | 4 |
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 | |||
116 | tagTranslation = mapMaybe charTrans | 116 | tagTranslation = 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 | ||