I am trying to create a multi line string in Groovy. I have a list of strings that I’d like to loop through within the multi line string. I am not sure what the syntax is for this. Something like below…
def html = """\
<ul>
<li>$awaiting.each { it.toPermalink()}</li>
</ul>
"""
The following:
Produces this output:
It basically calls the method on each element,
collectsthe results back into another list, and thenjoinsthe list together into a string