Skip to content

Commit

Permalink
Add test for matching break types
Browse files Browse the repository at this point in the history
  • Loading branch information
mwilliamson committed Jun 13, 2024
1 parent 9b1601c commit 326d351
Showing 1 changed file with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,19 @@ public void breaksThatAreNotLineBreaksAreIgnored() {
public void breaksCanBeMappedUsingStyleMappings() {
assertThat(
convertToHtml(
Break.PAGE_BREAK,
StyleMap.builder().mapBreak(BreakMatcher.PAGE_BREAK, HtmlPath.element("hr")).build()
run(withChildren(
Break.PAGE_BREAK,
Break.LINE_BREAK
)),
StyleMap.builder()
.mapBreak(BreakMatcher.PAGE_BREAK, HtmlPath.element("hr"))
.mapBreak(BreakMatcher.LINE_BREAK, HtmlPath.element("br", map("class", "line-break")))
.build()
),
deepEquals(list(Html.element("hr")))
deepEquals(list(
Html.element("hr"),
Html.element("br", map("class", "line-break"))
))
);
}

Expand Down

0 comments on commit 326d351

Please sign in to comment.