Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-8040

Markup Templates: improve pretty printing

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 2.4.7
    • None
    • Templating
    • None

    Description

      When I execute a template such as:

      html {
        head {	
          title('The title')
          meta(name: 'title', content: 'The title')
          meta(name: 'description', content: 'The description')
        }
      }
      

      Having autoIndent and autoNewLine set to true I expect a result similar to this:

      <html>
          <head>
              <title>The title</title>
              <meta name='title' content='The title'/>
              <meta name='description' content='The description'/>
          </head>
      </html>
      

      But I get all elements in the same level as one string:

      <html>
          <head>
              <title>The title</title><meta name='title' content='The title'/><meta name='description' content='The description'/>
          </head>
      </html>
      

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            sinuhepop Sinuhé
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: