fix formatting for multiple updates

This commit is contained in:
rhiannon morris 2024-10-21 14:39:53 +02:00
parent 6f3e3a08a3
commit 7671c1837a

View file

@ -17,6 +17,7 @@ import qualified Data.HashSet as Set
import Data.Traversable import Data.Traversable
import Data.Semigroup import Data.Semigroup
import Data.List.NonEmpty (toList) import Data.List.NonEmpty (toList)
import Data.Char (isSpace)
-- | e.g. only nsfw images are present for a non-nsfw page -- | e.g. only nsfw images are present for a non-nsfw page
@ -366,4 +367,8 @@ makeUpdate date ups = [b|
<dd>$desc <dd>$desc
|] where |] where
date' = formatSlash date date' = formatSlash date
desc = mconcat $ map fromText $ intersperse "; " $ toList $ fmap (.desc) ups desc = mconcat $
intersperse "; " $
map (fromText . Strict.dropWhileEnd isSpace) $
toList $
fmap (.desc) ups