The Groovy sample page provides an example of how to use the Groovy mixed-content HTML constructor:
p [
"This is some",
b"mixed",
"text. For more see the",
ahref:'http://groovy.codehaus.org' ["Groovy"],
"project"
]
This, however, does not work for me, I get an error message like:
expecting ']', found 'mixed' @ line 33, column 23. b"mixed", ^ 1 error
The Groovy sample page states that:
[Note: the syntax in some of these examples is slightly outdated. See Chapter 8 of GINA on average until these examples are updated.]
So my suspicion is that the syntax of the HTML builder has changed, however I don’t have a book, so I can’t check, and I can’t find a suitable example of this work on the Internet. Does anyone know how the syntax should be in Groovy 1.7 and did it get the job done?