Frank Becker created GROOVY-8844:
------------------------------------
Summary: 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
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 sucessful.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)