Closed mnel closed 11 years ago
Thanks for reporting, but it is a difficult one:
It is a kind of conflict between R and mustache/whisker. In the mustache definition, which whisker adheres to a "." signifies a nested object (while in R a ".' is just a character of a variable name).
So strictly speaking your template usage does not conform to the mustache definition.
Whisker currently sticks to the mustache definition
a <- list(test= "Mustache World") # ( == a$test)
a.test <- "R World"
template <- "Hello {{a.test}}!"
whisker.render(template)
You can fix your rendering by either changing your template or by changing the list:
a.test <- "World"
template <- "Hello {{a.test}}!"
whisker.render(template, list(a = list(test=a.test)))
Templates don' t handle names containing
.