From 98f0e2053e6e41654f26084d7d5b9dcbaed8931d Mon Sep 17 00:00:00 2001 From: Alexander Krotov Date: Sat, 20 Jan 2018 18:34:42 +0300 Subject: Muse reader: remove multiple descriptions during round-trip tests --- test/Tests/Readers/Muse.hs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/Tests') 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. -- cgit v1.2.3