Skip to content

Commit

Permalink
Create test to replicate #178
Browse files Browse the repository at this point in the history
  • Loading branch information
ultraq committed Mar 25, 2019
1 parent 5ac1da5 commit 6f7c68c
Showing 1 changed file with 45 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@

# Test for an infinite loop when nesting fragments, based off
# /~https://github.com/ultraq/thymeleaf-layout-dialect/issues/178

%TEMPLATE_MODE HTML


%INPUT
<html>
<body>
<div layout:fragment="comment">
Comment structure
<div layout:fragment="comment-details">Default comment details</div>
</div>

<div layout:include="~{::comment}">
<div layout:fragment="comment-details">
Top level comment
<div layout:include="~{::comment}">
<div layout:fragment="comment-details">Nested comment</div>
</div>
</div>
</div>
</body>
</html>

%OUTPUT
<html>
<body>
<div>
Comment structure
<div>Default comment details</div>
</div>
<div>
Comment structure
<div>
Top level comment
<div>
Comment structure
<div>Nested comment</div>
</div>
</div>
</div>
</body>
</html>

0 comments on commit 6f7c68c

Please sign in to comment.