Created
May 19, 2016 07:22
-
-
Save jagedn/304f7dca3eb11f8c59b9976576a0773e to your computer and use it in GitHub Desktop.
remove whitespace in g:each
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
default index.gsp: | |
<ul> | |
<g:each var="c" in="${grailsApplication.controllerClasses.sort { it.fullName } }"> | |
<li class="controller"><g:link controller="${c.logicalPropertyName}">${c.fullName}</g:link></li> | |
</g:each> | |
</ul> | |
result: | |
<ul> | |
<li class="controller"><a href="/books">glicerine.BookController</a></li> | |
</ul> | |
---------------------- | |
index.gsp without spaces: | |
<ul><g:each var="c" in="${grailsApplication.controllerClasses.sort { it.fullName } }"><li class="controller"><g:link controller="${c.logicalPropertyName}">${c.fullName}</g:link></li></g:each></ul> | |
and the result: | |
<ul><li class="controller"><a href="/books">glicerine.BookController</a></li></ul> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment