From the mustache documentation:
template <-
’Hello {{name}}
You have just won ${{value}}!
So, I tried this:
whisker.render("& Hello &{{place}}", list("place" = "World!"))
And I got a conclusion like:
[1] "& Hello &World!"
New approach:
I tried this:
y <-whisker.render("& Hello {{place}}", list("place" = "&World"))
Result for this:>
y
[1] "& Hello &World"
Then I used the gsub function on y, like this:
> gsub("&", "&", y)
[1] "& Hello &World"
which gave the above conclusion.
Instead of storing the value in a separate line, I applied gsub to the whisker function:
gsub("&", "&", whisker.render("& Hello {{place}}", list("place" = "&World")))
, .