@@ -21,8 +21,7 @@ import Test.Tasty.QuickCheck
2121import Test.Tasty.Options (IsOption(defaultValue))
2222import Tests.Helpers
2323import Text.Pandoc
24−import Text.Pandoc.Writers.Shared (toLegacyTable)
25−import Text.Pandoc.Shared (isHeaderBlock, onlySimpleTableCells)
24+import Text.Pandoc.Shared (isHeaderBlock)
2625import Text.Pandoc.Arbitrary ()
2726import Text.Pandoc.Builder
2827import Text.Pandoc.Walk (walk)
@@ -40,14 +39,7 @@ makeRoundTrip RawBlock{} = Para [Str "raw block was here"]
4039makeRoundTrip (Div attr bs) = Div attr $ filter (not . isHeaderBlock) bs
4140-- avoids round-trip failures related to makeSections
4241-- e.g. with [Div ("loc",[],[("a","11"),("b_2","a b c")]) [Header 3 ("",[],[]) []]]
43−makeRoundTrip b@(Table _attr blkCapt specs thead tbody tfoot) =
44− let (_capt, _aligns, widths, headers, rows') =
45− toLegacyTable blkCapt specs thead tbody tfoot
46− isSimple = onlySimpleTableCells (headers:rows')
47− in
48− if all (== 0.0) widths && not isSimple
49− then Para [Str "weird table omitted"]
50− else b
42+makeRoundTrip Table{} = Para [Str "table block was here"]
5143makeRoundTrip x = x
5244
5345removeRawInlines :: Inline -> Inline
@@ -61,7 +53,7 @@ roundTrip b = d'' == d'''
6153 d' = rewrite d
6254 d'' = rewrite d'
6355 d''' = rewrite d''
64− rewrite = html . T.pack . (++ "\n") . T.unpack .
56+ rewrite = html . (`T.snoc` '\n') .
6557 purely (writeHtml5String def
6658 { writerWrapText = WrapPreserve })
6759