mirror of
https://github.com/Yvee1/hascard.git
synced 2024-11-22 04:33:06 +03:00
Remove redundant newline Show
n after header
This commit is contained in:
parent
41a33916e6
commit
3e34b42599
10
src/Types.hs
10
src/Types.hs
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user