git.iko.soy/typeable/pandoc
on master help sign in
Muse reader: remove multiple descriptions during round-trip tests
commit98f0e2053e6e41654f26084d7d5b9dcbaed8931d authorAlexander Krotov <ilabdsf@gmail.com> dateSat 20 Jan 2018, 18:34 (9 years ago) parentfa912bb
1 file changed+6
test/Tests/Readers/Muse.hs+6
test/Tests/Readers/Muse.hs+6
@@ -28,9 +28,15 @@ spcSep :: [Inlines] -> Inlines
2828spcSep = mconcat . intersperse space
2929
3030-- Tables don't round-trip yet
31+-- Definition lists with multiple descriptions are supported by writer, but not reader yet
32+
33+singleDescription :: ([Inline], [[Block]]) -> ([Inline], [[Block]])
34+singleDescription (a, x:_) = (a, [x])
35+singleDescription x = x
3136
3237makeRoundTrip :: Block -> Block
3338makeRoundTrip Table{} = Para [Str "table was here"]
39+makeRoundTrip (DefinitionList items) = DefinitionList $ map singleDescription items
3440makeRoundTrip x = x
3541
3642-- Demand that any AST produced by Muse reader and written by Muse writer can be read back exactly the same way.