fhd / clostache

{{ mustache }} for Clojure
GNU Lesser General Public License v3.0
318 stars 62 forks source link

Handle path whitespace consistently #38

Closed zeroem closed 10 years ago

zeroem commented 10 years ago

Previously, white space in var lookups was not handled consistently between flat values and dotted notation. For instance, both {{var}} and {{ var }} are handled consistently. When using dotted notation, {{map.var}} works as expected, but {{ map.var }} would break. This was due to the leading whitespace being passed along with the path, resulting in the : map keyword, which didn't exist.

The solution presented resolves this by trimming whitespace from all path components.

fhd commented 10 years ago

Thanks, merged!