Added recursive Templator logic
This commit is contained in:
parent
ad04f622d3
commit
b92465b62b
3 changed files with 20 additions and 12 deletions
5
src/zutil/parser/Templator.java
Normal file → Executable file
5
src/zutil/parser/Templator.java
Normal file → Executable file
|
|
@ -411,7 +411,10 @@ public class Templator {
|
|||
public void compile(StringBuilder str) {
|
||||
Object obj = getObject();
|
||||
if(obj != null)
|
||||
str.append(obj.toString());
|
||||
if(obj instanceof Templator)
|
||||
str.append(((Templator) obj).compile());
|
||||
else
|
||||
str.append(obj.toString());
|
||||
else
|
||||
str.append("{{").append(tag).append("}}");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue