-
Feature Request
-
Resolution: Done
-
Major
-
None
-
None
-
None
Hi guys,
It would be really handy if CompiledTemplateResource had some kind of 'getCompiledTemplate' method. At the moment it just keeps this internally. My use case is:
I need to be able to compile a template and parse it for certain contents. At the moment this means I have to do it twice:
this.viewTemplate = this.compiler.compile(VIEW_TEMPLATE);
NamespacesAndIndent namespacesAndIndent = parseNamespacesAndIndent(this.compiler
.getTemplateResolverFactory()
.resolve(VIEW_TEMPLATE).getInputStream());
If I could get to the actual CompiledTemplate, then CompiledTemplate.getRoot() and CompiledTemplate.getTemplate() have already been parsed for me.