1
1
mirror of https://github.com/Yvee1/hascard.git synced 2024-11-22 04:33:06 +03:00

Remove redundant newline Shown after header

This commit is contained in:
Steven van den Broek 2021-07-16 22:40:36 +02:00
parent 41a33916e6
commit 3e34b42599

View File

@ -36,14 +36,14 @@ data Card = Definition {
instance Show Card where
show card = let showHeader h = "# " <> h <> "\n"
in case card of
Definition h img descr -> showHeader h <> maybe "" show img <> "\n" <> descr
OpenQuestion h img p -> showHeader h <> maybe "" show img <> "\n" <> show p
Definition h img descr -> showHeader h <> maybe "" ((<>"\n") . show) img <> descr
OpenQuestion h img p -> showHeader h <> maybe "" ((<>"\n") . show) img <> show p
MultipleChoice h img c inc ->
showHeader h <> maybe "" show img <> "\n" <> showMultipleChoice c inc
showHeader h <> maybe "" ((<>"\n") . show) img <> showMultipleChoice c inc
MultipleAnswer h img opts ->
showHeader h <> maybe "" show img <> "\n" <> unlines' (NE.toList (NE.map show opts))
showHeader h <> maybe "" ((<>"\n") . show) img <> unlines' (NE.toList (NE.map show opts))
Reorder h img elts ->
showHeader h <>maybe "" show img <> "\n" <> unlines' (NE.toList (NE.map showReorder elts))
showHeader h <>maybe "" ((<>"\n") . show) img <> unlines' (NE.toList (NE.map showReorder elts))
-- alt file
data External = Image String String