" $ "
hello
" =?> doc (divWith ("", [], [("role", "main")]) (plain (text "hello"))) , test htmlNativeDivs "
becomes
" $ "
hello
" =?> doc (divWith ("", [], [("role", "foobar")]) (plain (text "hello"))) , test htmlNativeDivs "
has attributes preserved" $ "
hello
" =?> doc (divWith ("foo", ["bar"], [("role", "main"), ("baz", "qux")]) (plain (text "hello"))) , test htmlNativeDivs "
closes

" $ "

hello

main content
" =?> doc (para (text "hello") <> divWith ("", [], [("role", "main")]) (plain (text "main content"))) , test htmlNativeDivs "
followed by text" $ "
main content
non-main content" =?> doc (divWith ("", [], [("role", "main")]) (plain (text "main content")) <> plain (text "non-main content")) ] , testGroup "samp" [ test html "inline samp block" $ "Answer is 42" =?> plain (codeWith ("",["sample"],[]) "Answer is 42") ] , testGroup "var" [ test html "inline var block" $ "result" =?> plain (codeWith ("",["variable"],[]) "result") ] , testGroup "header" [ test htmlNativeDivs "
is parsed as a div" $ "
Title
" =?> divWith ("title", mempty, mempty) (plain "Title") ] , testGroup "code block" [ test html "attributes in pre > code element" $ "
\nprint('hi')\n
" =?> codeBlockWith ("a", ["python"], []) "print('hi')" , test html "attributes in pre take precendence" $ "
\nprint('hi mom!')\n
" =?> codeBlockWith ("c", [], []) "print('hi mom!')" ] , askOption $ \(QuickCheckTests numtests) -> testProperty "Round trip" $ withMaxSuccess (if QuickCheckTests numtests == defaultValue then 25 else numtests) roundTrip ]