stencilproject / Stencil

Stencil is a simple and powerful template language for Swift.
https://stencil.fuller.li
BSD 2-Clause "Simplified" License
2.34k stars 223 forks source link

Fixed using spaces in filter expressions and variables lists #178

Closed ilyapuchka closed 6 years ago

ilyapuchka commented 6 years ago

When parsing filter expression spaces were not trimmed in filter name and parameters. Also this fixes using spaces in any other nodes where smart split by spaces is used, i.e. in for node. It allows use of a, b or a , b, but not a ,b. The same about | and : separators. So this also fixes #169

ilyapuchka commented 6 years ago

@kylef can we merge this? I believe this will improve templates readability

ilyapuchka commented 6 years ago

@AliSoftware @yonaskolb is it good to go?

AliSoftware commented 6 years ago

I'm still not a fan of force-unwrap even especially when we have better constructs to use instead