[jira] [Commented] (GROOVY-8844) MarkupTemplateEngine does not render main tag
[ https://issues.apache.org/jira/browse/GROOVY-8844?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16650164#comment-16650164 ] Frank Becker commented on GROOVY-8844: -- Thanks for the quick response and the workaround, which works fine for me. > 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 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() == "a > titleinside main of > body" > {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)
[jira] [Commented] (GROOVY-8844) MarkupTemplateEngine does not render main tag
[ https://issues.apache.org/jira/browse/GROOVY-8844?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16650134#comment-16650134 ] Paul King commented on GROOVY-8844: --- Looks like an unintended side-effect for the fix for GROOVY-8764 that we mustn't have had test coverage for. :( Temp workaround if it's possible for you is to use {{this.main}} instead of {{main}}. > 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 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() == "a > titleinside main of > body" > {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)