summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Krotov <ilabdsf@gmail.com>2018-01-20 18:34:42 +0300
committerAlexander Krotov <ilabdsf@gmail.com>2018-01-20 18:34:42 +0300
commit98f0e2053e6e41654f26084d7d5b9dcbaed8931d (patch)
treebcc6911a7e5c87dfdcf5cb13d874cc467d165441
parentfa912bb15e3ceac863fb8d46ee6f137da34eb634 (diff)
Muse reader: remove multiple descriptions during round-trip tests
-rw-r--r--test/Tests/Readers/Muse.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/Tests/Readers/Muse.hs b/test/Tests/Readers/Muse.hs
index 2ef2af2bc..36b08c3a2 100644
--- a/test/Tests/Readers/Muse.hs
+++ b/test/Tests/Readers/Muse.hs
@@ -28,9 +28,15 @@ spcSep :: [Inlines] -> Inlines
spcSep = mconcat . intersperse space
-- Tables don't round-trip yet
+-- Definition lists with multiple descriptions are supported by writer, but not reader yet
+
+singleDescription :: ([Inline], [[Block]]) -> ([Inline], [[Block]])
+singleDescription (a, x:_) = (a, [x])
+singleDescription x = x
makeRoundTrip :: Block -> Block
makeRoundTrip Table{} = Para [Str "table was here"]
+makeRoundTrip (DefinitionList items) = DefinitionList $ map singleDescription items
makeRoundTrip x = x
-- Demand that any AST produced by Muse reader and written by Muse writer can be read back exactly the same way.