@@ -21,6 +21,7 @@ import Test.Tasty.QuickCheck
2121import Test.Tasty.Options (IsOption(defaultValue))
2222import Tests.Helpers
2323import Text.Pandoc
24+import Text.Pandoc.Shared (isHeaderBlock)
2425import Text.Pandoc.Arbitrary ()
2526import Text.Pandoc.Builder
2627import Text.Pandoc.Walk (walk)
@@ -35,6 +36,9 @@ makeRoundTrip :: Block -> Block
3536makeRoundTrip CodeBlock{} = Para [Str "code block was here"]
3637makeRoundTrip LineBlock{} = Para [Str "line block was here"]
3738makeRoundTrip RawBlock{} = Para [Str "raw block was here"]
39+makeRoundTrip (Div attr bs) = Div attr $ filter (not . isHeaderBlock) bs
40+-- avoids round-trip failures related to makeSections
41+-- e.g. with [Div ("loc",[],[("a","11"),("b_2","a b c")]) [Header 3 ("",[],[]) []]]
3842makeRoundTrip x = x
3943
4044removeRawInlines :: Inline -> Inline