Muse reader: compare first rewrite to the second in round-trip test
This commit is contained in:
parent
bf16a9c78a
commit
3ee45a7357
1 changed files with 2 additions and 4 deletions
|
@ -36,14 +36,12 @@ makeRoundTrip (OrderedList (start, UpperAlpha, _) items) = OrderedList (start, D
|
|||
makeRoundTrip x = x
|
||||
|
||||
-- Demand that any AST produced by Muse reader and written by Muse writer can be read back exactly the same way.
|
||||
-- Currently we remove tables and compare third rewrite to the second.
|
||||
-- First and second rewrites are not equal yet.
|
||||
-- Currently we remove tables and compare first rewrite to the second.
|
||||
roundTrip :: Block -> Bool
|
||||
roundTrip b = d'' == d'''
|
||||
roundTrip b = d' == d''
|
||||
where d = walk makeRoundTrip $ Pandoc nullMeta [b]
|
||||
d' = rewrite d
|
||||
d'' = rewrite d'
|
||||
d''' = rewrite d''
|
||||
rewrite = amuse . T.pack . (++ "\n") . T.unpack .
|
||||
purely (writeMuse def { writerExtensions = extensionsFromList [Ext_amuse]
|
||||
, writerWrapText = WrapPreserve
|
||||
|
|
Loading…
Add table
Reference in a new issue