I am making a custom tag library in which I have to output html contents to the view using tag library. And we can output the contents like-
def globalCSS = { attrs, body ->
out << '<!-- BEGIN GLOBAL MANDATORY STYLES -->'
out << '<link href="http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700&subset=all" rel="stylesheet" type="text/css">'
out << '<link rel="stylesheet" type="text/css" href="'+g.resource(dir: 'assets/global/plugins/font-awesome/css', file: 'font-awesome.min.css', absolute: true)+'"/>'
out << '<link rel="stylesheet" type="text/css" href="'+g.resource(dir: 'assets/global/plugins/simple-line-icons', file: 'simple-line-icons.min.css', absolute: true)+'"/>'
out << '<link rel="stylesheet" type="text/css" href="'+g.resource(dir: 'assets/global/plugins/bootstrap/css', file: 'bootstrap.min.css', absolute: true)+'"/>'
out << '<link rel="stylesheet" type="text/css" href="'+g.resource(dir: 'assets/global/plugins/uniform/css', file: 'uniform.default.css', absolute: true)+'"/>'
out << '<!-- END GLOBAL MANDATORY STYLES -->'
}
Now the problem is that if I try to enter multiple lines in one out
then it throws an error that-
def globalCSS = { attrs, body ->
out << 'Bla bla bla
Super bla bla
Awesome bla bla'
}
Error-
Multiple markers at this line
- implements groovy.lang.Script.run
- Groovy:expecting ''', found '\r' @ line 10,
So is there anyway to post multiple lines in one out? As it would be easy for me to copy paste the HTML code which I need to output so please suggest a way to do that.