@@ -457,21 +457,25 @@ tests =
457457
458458 , "First Level Header" =:
459459 "* Headline\n" =?>
460− header 1 "Headline"
460+ headerWith ("headline", [], []) 1 "Headline"
461461
462462 , "Third Level Header" =:
463463 "*** Third Level Headline\n" =?>
464− header 3 ("Third" <> space <>
465− "Level" <> space <>
466− "Headline")
464+ headerWith ("third-level-headline", [], [])
465+ 3
466+ ("Third" <> space <> "Level" <> space <> "Headline")
467467
468468 , "Compact Headers with Paragraph" =:
469469 unlines [ "* First Level"
470470 , "** Second Level"
471471 , " Text"
472472 ] =?>
473− mconcat [ header 1 ("First" <> space <> "Level")
474− , header 2 ("Second" <> space <> "Level")
473+ mconcat [ headerWith ("first-level", [], [])
474+ 1
475+ ("First" <> space <> "Level")
476+ , headerWith ("second-level", [], [])
477+ 2
478+ ("Second" <> space <> "Level")
475479 , para "Text"
476480 ]
477481
@@ -482,8 +486,12 @@ tests =
482486 , ""
483487 , " Text"
484488 ] =?>
485− mconcat [ header 1 ("First" <> space <> "Level")
486− , header 2 ("Second" <> space <> "Level")
489+ mconcat [ headerWith ("first-level", [], [])
490+ 1
491+ ("First" <> space <> "Level")
492+ , headerWith ("second-level", [], [])
493+ 2
494+ ("Second" <> space <> "Level")
487495 , para "Text"
488496 ]
489497
@@ -492,9 +500,13 @@ tests =
492500 , "Spaghetti and meatballs tonight."
493501 , "** walk dog"
494502 ] =?>
495− mconcat [ header 2 ("eat" <> space <> "dinner")
503+ mconcat [ headerWith ("eat-dinner", [], [])
504+ 2
505+ ("eat" <> space <> "dinner")
496506 , para $ spcSep [ "Spaghetti", "and", "meatballs", "tonight." ]
497− , header 2 ("walk" <> space <> "dog")
507+ , headerWith ("walk-dog", [], [])
508+ 2
509+ ("walk" <> space <> "dog")
498510 ]
499511
500512 , "Tagged headers" =:
@@ -503,14 +515,20 @@ tests =
503515 , "** Call John :@PHONE:JOHN: "
504516 ] =?>
505517 let tagSpan t = spanWith ("", ["tag"], [("data-tag-name", t)]) mempty
506− in mconcat [ header 1 ("Personal" <> tagSpan "PERSONAL")
507− , header 2 ("Call Mom" <> tagSpan "@PHONE")
508− , header 2 ("Call John" <> tagSpan "@PHONE" <> tagSpan "JOHN")
518+ in mconcat [ headerWith ("personal", [], [])
519+ 1
520+ ("Personal" <> tagSpan "PERSONAL")
521+ , headerWith ("call-mom", [], [])
522+ 2
523+ ("Call Mom" <> tagSpan "@PHONE")
524+ , headerWith ("call-john", [], [])
525+ 2
526+ ("Call John" <> tagSpan "@PHONE" <> tagSpan "JOHN")
509527 ]
510528
511529 , "Untagged header containing colons" =:
512530 "* This: is not: tagged" =?>
513− header 1 "This: is not: tagged"
531+ headerWith ("this-is-not-tagged", [], []) 1 "This: is not: tagged"
514532
515533 , "Comment Trees" =:
516534 unlines [ "* COMMENT A comment tree"
@@ -518,7 +536,7 @@ tests =
518536 , "** This will be dropped"
519537 , "* Comment tree above"
520538 ] =?>
521− header 1 "Comment tree above"
539+ headerWith ("comment-tree-above", [], []) 1 "Comment tree above"
522540
523541 , "Nothing but a COMMENT header" =:
524542 "* COMMENT Test" =?>
@@ -640,7 +658,7 @@ tests =
640658 [ "Another", space, "note"
641659 , note $ para ("This" <> space <> "is" <> space <> "great!")
642660 ])
643− , header 2 "Headline"
661+ , headerWith ("headline", [], []) 2 "Headline"
644662 ]
645663 ]
646664
@@ -664,7 +682,7 @@ tests =
664682 "* Item2\n") =?>
665683 bulletList [ plain "Item1"
666684 ] <>
667− header 1 "Item2"
685+ headerWith ("item2", [], []) 1 "Item2"
668686
669687 , "Multi-line Bullet Lists" =:
670688 ("- *Fat\n" ++
@@ -724,7 +742,7 @@ tests =
724742 mconcat [ bulletList [ plain "Discovery"
725743 , plain ("Human" <> space <> "After" <> space <> "All")
726744 ]
727− , header 1 "Homework"
745+ , headerWith ("homework", [], []) 1 "Homework"
728746 ]
729747
730748 , "Bullet List Unindented with trailing Header" =:
@@ -734,7 +752,7 @@ tests =
734752 mconcat [ bulletList [ plain "Discovery"
735753 , plain "Homework"
736754 ]
737− , header 1 "NotValidListItem"
755+ , headerWith ("notvalidlistitem", [], []) 1 "NotValidListItem"
738756 ]
739757
740758 , "Simple Ordered List" =:
@@ -839,7 +857,7 @@ tests =
839857 mconcat [ definitionList [ ("definition", [plain "list"])
840858 , ("cool", [plain "defs"])
841859 ]
842− , header 1 "header"
860+ , headerWith ("header", [], []) 1 "header"
843861 ]
844862
845863 , "Loose bullet list" =: