Using Thymeleaf th:each loop, whitespace is removed (or can't be added).
Thymeleaf code:
<div>
<a href="#" style="text-decoration: underline" th:each="for loop here"></a>
</div>
I expected:
<div>
<a href="#" style="text-decoration: underline">Link 1</a>
<a href="#" style="text-decoration: underline">Link 2</a>
<a href="#" style="text-decoration: underline">Link 3</a>
<a href="#" style="text-decoration: underline">Link 4</a>
<a href="#" style="text-decoration: underline">Link 5</a>
</div>
but html rendered below.
<div><a href="#" style="text-decoration: underline">Link 1</a><a href="#" style="text-decoration: underline">Link 2</a><a href="#" style="text-decoration: underline">Link 3</a><a href="#" style="text-decoration: underline">Link 4</a><a href="#" style="text-decoration: underline">Link 5</a></div>
How to add whitespace (in html file new line) using Thymeleaf th:each?
My Thymeleaf version is 3.0.12.RELEASE