@@ -457,21 +457,25 @@ tests =
458 , "First Level Header" =:
458 , "First Level Header" =:
459 "* Headline\n" =?>
459 "* Headline\n" =?>
460− header 1 "Headline"
460+ headerWith ("headline", [], []) 1 "Headline"
462 , "Third Level Header" =:
462 , "Third Level Header" =:
463 "*** Third Level Headline\n" =?>
463 "*** Third Level Headline\n" =?>
464− header 3 ("Third" <> space <>
464+ headerWith ("third-level-headline", [], [])
465− "Level" <> space <>
466+ ("Third" <> space <> "Level" <> space <> "Headline")
468 , "Compact Headers with Paragraph" =:
468 , "Compact Headers with Paragraph" =:
469 unlines [ "* First Level"
469 unlines [ "* First Level"
470 , "** Second Level"
470 , "** Second Level"
471 , " Text"
471 , " Text"
473+ mconcat [ headerWith ("first-level", [], [])
473− mconcat [ header 1 ("First" <> space <> "Level")
475+ ("First" <> space <> "Level")
476+ , headerWith ("second-level", [], [])
474− , header 2 ("Second" <> space <> "Level")
478+ ("Second" <> space <> "Level")
475 , para "Text"
479 , para "Text"
@@ -482,8 +486,12 @@ tests =
483 , " Text"
487 , " Text"
489+ mconcat [ headerWith ("first-level", [], [])
485− mconcat [ header 1 ("First" <> space <> "Level")
491+ ("First" <> space <> "Level")
492+ , headerWith ("second-level", [], [])
486− , header 2 ("Second" <> space <> "Level")
494+ ("Second" <> space <> "Level")
487 , para "Text"
495 , para "Text"
@@ -492,9 +500,13 @@ tests =
492 , "Spaghetti and meatballs tonight."
500 , "Spaghetti and meatballs tonight."
493 , "** walk dog"
501 , "** walk dog"
503+ mconcat [ headerWith ("eat-dinner", [], [])
495− mconcat [ header 2 ("eat" <> space <> "dinner")
505+ ("eat" <> space <> "dinner")
496 , para $ spcSep [ "Spaghetti", "and", "meatballs", "tonight." ]
506 , para $ spcSep [ "Spaghetti", "and", "meatballs", "tonight." ]
507+ , headerWith ("walk-dog", [], [])
497− , header 2 ("walk" <> space <> "dog")
509+ ("walk" <> space <> "dog")
500 , "Tagged headers" =:
512 , "Tagged headers" =:
@@ -503,14 +515,20 @@ tests =
503 , "** Call John :@PHONE:JOHN: "
515 , "** Call John :@PHONE:JOHN: "
505 let tagSpan t = spanWith ("", ["tag"], [("data-tag-name", t)]) mempty
517 let tagSpan t = spanWith ("", ["tag"], [("data-tag-name", t)]) mempty
518+ in mconcat [ headerWith ("personal", [], [])
506− in mconcat [ header 1 ("Personal" <> tagSpan "PERSONAL")
520+ ("Personal" <> tagSpan "PERSONAL")
521+ , headerWith ("call-mom", [], [])
507− , header 2 ("Call Mom" <> tagSpan "@PHONE")
523+ ("Call Mom" <> tagSpan "@PHONE")
524+ , headerWith ("call-john", [], [])
508− , header 2 ("Call John" <> tagSpan "@PHONE" <> tagSpan "JOHN")
526+ ("Call John" <> tagSpan "@PHONE" <> tagSpan "JOHN")
511 , "Untagged header containing colons" =:
529 , "Untagged header containing colons" =:
512 "* This: is not: tagged" =?>
530 "* This: is not: tagged" =?>
513− header 1 "This: is not: tagged"
531+ headerWith ("this-is-not-tagged", [], []) 1 "This: is not: tagged"
515 , "Comment Trees" =:
533 , "Comment Trees" =:
516 unlines [ "* COMMENT A comment tree"
534 unlines [ "* COMMENT A comment tree"
@@ -518,7 +536,7 @@ tests =
518 , "** This will be dropped"
536 , "** This will be dropped"
519 , "* Comment tree above"
537 , "* Comment tree above"
521− header 1 "Comment tree above"
539+ headerWith ("comment-tree-above", [], []) 1 "Comment tree above"
523 , "Nothing but a COMMENT header" =:
541 , "Nothing but a COMMENT header" =:
524 "* COMMENT Test" =?>
542 "* COMMENT Test" =?>
@@ -640,7 +658,7 @@ tests =
640 [ "Another", space, "note"
658 [ "Another", space, "note"
641 , note $ para ("This" <> space <> "is" <> space <> "great!")
659 , note $ para ("This" <> space <> "is" <> space <> "great!")
643− , header 2 "Headline"
661+ , headerWith ("headline", [], []) 2 "Headline"
@@ -664,7 +682,7 @@ tests =
664 "* Item2\n") =?>
682 "* Item2\n") =?>
665 bulletList [ plain "Item1"
683 bulletList [ plain "Item1"
667− header 1 "Item2"
685+ headerWith ("item2", [], []) 1 "Item2"
669 , "Multi-line Bullet Lists" =:
687 , "Multi-line Bullet Lists" =:
670 ("- *Fat\n" ++
688 ("- *Fat\n" ++
@@ -724,7 +742,7 @@ tests =
724 mconcat [ bulletList [ plain "Discovery"
742 mconcat [ bulletList [ plain "Discovery"
725 , plain ("Human" <> space <> "After" <> space <> "All")
743 , plain ("Human" <> space <> "After" <> space <> "All")
727− , header 1 "Homework"
745+ , headerWith ("homework", [], []) 1 "Homework"
730 , "Bullet List Unindented with trailing Header" =:
748 , "Bullet List Unindented with trailing Header" =:
@@ -734,7 +752,7 @@ tests =
734 mconcat [ bulletList [ plain "Discovery"
752 mconcat [ bulletList [ plain "Discovery"
735 , plain "Homework"
753 , plain "Homework"
737− , header 1 "NotValidListItem"
755+ , headerWith ("notvalidlistitem", [], []) 1 "NotValidListItem"
740 , "Simple Ordered List" =:
758 , "Simple Ordered List" =:
@@ -839,7 +857,7 @@ tests =
839 mconcat [ definitionList [ ("definition", [plain "list"])
857 mconcat [ definitionList [ ("definition", [plain "list"])
840 , ("cool", [plain "defs"])
858 , ("cool", [plain "defs"])
842− , header 1 "header"
860+ , headerWith ("header", [], []) 1 "header"
845 , "Loose bullet list" =:
863 , "Loose bullet list" =: