Sinuhé created GROOVY-8040:
------------------------------

             Summary: 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', '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.






--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to