Open richfitz opened 10 years ago
There is an inconsistency in the whitespace generated by these two templates:
str1 <- 'header {{#query}} holla {{/query}} footer' str2 <- 'header {{#obj.query}} holla {{/obj.query}} footer'
(the only difference is that the section variable is within a list obj in the second version).
obj
This version gives what I would expect:
library(whisker) whisker.render(str1, list(query=TRUE)) # "header\nholla\nfooter" whisker.render(str1, list(query=FALSE)) # "header\nfooter"
While the second version generates extra newlines:
library(whisker) whisker.render(str2, list(obj=list(query=TRUE))) # "header\n\nholla\n\nfooter" whisker.render(str2, list(obj=list(query=FALSE))) # "header\n\nfooter"
This does not affect the version from CRAN (0.3-2).
There is an inconsistency in the whitespace generated by these two templates:
(the only difference is that the section variable is within a list
obj
in the second version).This version gives what I would expect:
While the second version generates extra newlines:
This does not affect the version from CRAN (0.3-2).