edwindj / whisker

{{mustache}} for R
https://mustache.github.io
213 stars 19 forks source link

Fix for unexpected handling for character vectors by whisker.render #6

Closed MOCSABNIMAJNEB closed 10 years ago

MOCSABNIMAJNEB commented 11 years ago

Made a change to a string comparison test that was being run before char vectors were collapsed which had previously made it so that trying to render character vector templates starting with the empty string would return the empty string even when there was valid input in the rest of the vector. This was caused because R would evaluate the first element of the vector against the condition since length(template) > 1.