crystal-lang / crystal

The Crystal Programming Language
https://crystal-lang.org
Apache License 2.0
19.2k stars 1.61k forks source link

Fix ECR escape sequences containing `-` #14739

Closed HertzDevil closed 1 week ago

HertzDevil commented 1 week ago

Fixes #14734.

Also makes it documented behavior that the escaped tags never strip leading indentation or trailing newlines, so the following:

foo
  <%-%# comment -%>
bar

renders:

foo
  <%-# comment -%>
bar

instead of:

foo
<%-# comment -%>bar

so that if an ECR template itself is rendered by another ECR template, the indentation is preserved.