You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Frank Becker (JIRA)" <ji...@apache.org> on 2018/10/15 10:37:00 UTC

[jira] [Updated] (GROOVY-8844) MarkupTemplateEngine does not render main tag

     [ https://issues.apache.org/jira/browse/GROOVY-8844?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Frank Becker updated GROOVY-8844:
---------------------------------
    Description: 
Since 2.5.3 the MarkupTemplateEngine does not render <main> tags anymore.

Executing the following script throws an Exception. See exception.txt.
{code}
import groovy.text.markup.TemplateConfiguration
import groovy.text.markup.MarkupTemplateEngine


def config = new TemplateConfiguration()
MarkupTemplateEngine engine = new MarkupTemplateEngine(config)
def template = engine.createTemplate '''

  html {
    head {
      title('a title')
    }
    body {
      main {
        p('inside main of body')
      }
    }
  }
'''

StringWriter rendered = new StringWriter()
template.make().writeTo(rendered)
assert rendered.toString() == "<html><head><title>a title</title></head><body><main><p>inside main of body</p></main></body></html>"
{code}

It's the same for jdk 8. With 2.5.2 the script executes successful.

  was:
Since 2.5.3 the MarkupTemplateEngine does not render <main> tags anymore.

Executing the following script throws an Exception. See exception.txt.
{code}
import groovy.text.markup.TemplateConfiguration
import groovy.text.markup.MarkupTemplateEngine


def config = new TemplateConfiguration()
MarkupTemplateEngine engine = new MarkupTemplateEngine(config)
def template = engine.createTemplate '''

  html {
    head {
      title('a title')
    }
    body {
      main {
        p('inside main of body')
      }
    }
  }
'''

StringWriter rendered = new StringWriter()
template.make().writeTo(rendered)
assert rendered.toString() == "<html><head><title>a title</title></head><body><main><p>inside main of body</p></main></body></html>"
{code}

It's the same for jdk 8. With 2.5.2 the script executes sucessful.


> MarkupTemplateEngine does not render main tag
> ---------------------------------------------
>
>                 Key: GROOVY-8844
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8844
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 2.5.3
>         Environment: groovy -version
> Groovy Version: 2.5.3 JVM: 11 Vendor: Oracle Corporation OS: Linux
> java -version
> openjdk version "11" 2018-09-25
> OpenJDK Runtime Environment 18.9 (build 11+28)
> OpenJDK 64-Bit Server VM 18.9 (build 11+28, mixed mode)
>            Reporter: Frank Becker
>            Priority: Major
>         Attachments: MarkupTemplateBroken.groovy, exception.txt
>
>
> Since 2.5.3 the MarkupTemplateEngine does not render <main> tags anymore.
> Executing the following script throws an Exception. See exception.txt.
> {code}
> import groovy.text.markup.TemplateConfiguration
> import groovy.text.markup.MarkupTemplateEngine
> def config = new TemplateConfiguration()
> MarkupTemplateEngine engine = new MarkupTemplateEngine(config)
> def template = engine.createTemplate '''
>   html {
>     head {
>       title('a title')
>     }
>     body {
>       main {
>         p('inside main of body')
>       }
>     }
>   }
> '''
> StringWriter rendered = new StringWriter()
> template.make().writeTo(rendered)
> assert rendered.toString() == "<html><head><title>a title</title></head><body><main><p>inside main of body</p></main></body></html>"
> {code}
> It's the same for jdk 8. With 2.5.2 the script executes successful.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)