Reset compiler.delims after parsing a template

This commit is contained in:
David Loehr
2013-05-03 11:57:53 -04:00
parent 158b34f041
commit 751f671fd6
2 changed files with 42 additions and 2 deletions
@@ -488,6 +488,18 @@ public class MustacheTest
String nullvar = null;
});
}
@Test public void testCompilingDoesntChangeCompilersDelimiters() {
Mustache.Compiler compiler = Mustache.compiler();
test(compiler,
"value", "{{=<% %>=}}<% variable %>", new Object() {
String variable = "value";
});
test(compiler,
"value", "{{=<% %>=}}<% variable %>", new Object() {
String variable = "value";
});
}
@Test public void testLambda1 () {
test("<b>Willy is awesome.</b>", "{{#bold}}{{name}} is awesome.{{/bold}}",