aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/Tests/Readers/HTML.hs14
1 files changed, 3 insertions, 11 deletions
diff --git a/test/Tests/Readers/HTML.hs b/test/Tests/Readers/HTML.hs
index b9fe8b501..e4c681421 100644
--- a/test/Tests/Readers/HTML.hs
+++ b/test/Tests/Readers/HTML.hs
@@ -21,8 +21,7 @@ import Test.Tasty.QuickCheck
import Test.Tasty.Options (IsOption(defaultValue))
import Tests.Helpers
import Text.Pandoc
-import Text.Pandoc.Writers.Shared (toLegacyTable)
-import Text.Pandoc.Shared (isHeaderBlock, onlySimpleTableCells)
+import Text.Pandoc.Shared (isHeaderBlock)
import Text.Pandoc.Arbitrary ()
import Text.Pandoc.Builder
import Text.Pandoc.Walk (walk)
@@ -40,14 +39,7 @@ makeRoundTrip RawBlock{} = Para [Str "raw block was here"]
makeRoundTrip (Div attr bs) = Div attr $ filter (not . isHeaderBlock) bs
-- avoids round-trip failures related to makeSections
-- e.g. with [Div ("loc",[],[("a","11"),("b_2","a b c")]) [Header 3 ("",[],[]) []]]
-makeRoundTrip b@(Table _attr blkCapt specs thead tbody tfoot) =
- let (_capt, _aligns, widths, headers, rows') =
- toLegacyTable blkCapt specs thead tbody tfoot
- isSimple = onlySimpleTableCells (headers:rows')
- in
- if all (== 0.0) widths && not isSimple
- then Para [Str "weird table omitted"]
- else b
+makeRoundTrip Table{} = Para [Str "table block was here"]
makeRoundTrip x = x
removeRawInlines :: Inline -> Inline
@@ -61,7 +53,7 @@ roundTrip b = d'' == d'''
d' = rewrite d
d'' = rewrite d'
d''' = rewrite d''
- rewrite = html . T.pack . (++ "\n") . T.unpack .
+ rewrite = html . (`T.snoc` '\n') .
purely (writeHtml5String def
{ writerWrapText = WrapPreserve })