straight-shoota / crinja

Implementation of Jinja2 template language in Crystal
https://straight-shoota.github.io/crinja/
Other
127 stars 12 forks source link

Allow escaped backslashes #31

Closed ezrast closed 4 years ago

ezrast commented 4 years ago

Escaped backslashes in string literals currently get swallowed:

pp! Crinja.render <<-'JINJA'
  {% set foo="\\" %}{{ foo }}
  JINJA
# => ""
straight-shoota commented 4 years ago

Could you also add a spec for this? Should probably go into expression_parser_spec.

ezrast commented 4 years ago

@straight-shoota Done.

straight-shoota commented 4 years ago

Thank you :heart: