Skip to content

Commit

Permalink
#325 add test for breaking change
Browse files Browse the repository at this point in the history
  • Loading branch information
casid committed Jan 27, 2024
1 parent 818beb7 commit d0f1d46
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,21 @@ void htmlComment_raw() {
assertThat(output.toString()).isEqualTo("<!-- html comment --><a href=\"https://jte.gg\">Click me!</a>");
}

@Test
void htmlComment_inContentBlock() {
codeResolver.givenCode("template.jte", """
!{var content = @`
<!-- test comment (breaks) -->
<div class="test"></div>
`;}
${content}
""");

templateEngine.render("template.jte", null, output);

assertThat(output.toString()).isEqualToIgnoringWhitespace("<div class=\"test\"></div>");
}

@Test
void jsComment() {
codeResolver.givenCode("template.jte", "@param String hello\n<script>// hello\nvar x = 'hello';</script>${hello}");
Expand Down

0 comments on commit d0f1d46

Please sign in to comment.