[
https://issues.apache.org/jira/browse/GROOVY-8040?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sinuhé updated GROOVY-8040:
---------------------------
Description:
When I execute a template such as:
{code}
html {
head {
title('The title')
meta(name: 'title', content: 'The title')
meta(name: 'description', content: 'The description')
}
}
{code}
Having *autoIndent* and *autoNewLine* set to *true* I expect a result similar
to this:
{code}
<html>
<head>
<title>The title</title>
<meta name='title' content='The title'/>
<meta name='description' content='The description'/>
</head>
</html>
{code}
But I get all elements in the same level as one string:
{code}
<html>
<head>
<title>The title</title><meta name='title' content='The title'/><meta
name='description' content='The description'/>
</head>
</html>
{code}
When there are a lot of elements in the same level leads to an unreadable
formatting, what obviously isn't the purpose of pretty printing.
was:
When I execute a template such as:
{code}
html {
head {
title('The title')
meta(name: 'title', 'The title')
meta(name: 'description', 'The description')
}
}
{code}
Having *autoIndent* and *autoNewLine* set to *true* I expect a result similar
to this:
{code}
<html>
<head>
<title>The title</title>
<meta name='title'>The title</meta>
<meta name='description'>The description</meta>
</head>
</html>
{code}
But I get all elements in the same level as one string:
{code}
<html>
<head>
<title>The title</title><meta name='title'>The title</meta><meta
name='description'>The description</meta>
</head>
</html>
{code}
When there are a lot of elements in the same level leads to an unreadable
formatting, what obviously isn't the purpose of pretty printing.
> Markup Templates: improve pretty printing
> -----------------------------------------
>
> Key: GROOVY-8040
> URL: https://issues.apache.org/jira/browse/GROOVY-8040
> Project: Groovy
> Issue Type: Improvement
> Components: Templating
> Affects Versions: 2.4.7
> Reporter: Sinuhé
> Priority: Minor
>
> When I execute a template such as:
> {code}
> html {
> head {
> title('The title')
> meta(name: 'title', content: 'The title')
> meta(name: 'description', content: 'The description')
> }
> }
> {code}
> Having *autoIndent* and *autoNewLine* set to *true* I expect a result similar
> to this:
> {code}
> <html>
> <head>
> <title>The title</title>
> <meta name='title' content='The title'/>
> <meta name='description' content='The description'/>
> </head>
> </html>
> {code}
> But I get all elements in the same level as one string:
> {code}
> <html>
> <head>
> <title>The title</title><meta name='title' content='The title'/><meta
> name='description' content='The description'/>
> </head>
> </html>
> {code}
> When there are a lot of elements in the same level leads to an unreadable
> formatting, what obviously isn't the purpose of pretty printing.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)