Closed shmargum closed 8 years ago
While the tested behavior is compatible with haml, this spec has nothing to do with plain filter. Plain filter's feature and escape method's behavior are independent and I couldn't understand why this spec is necessary. So this PR isn't acceptable.
would it also be possible to use the global configuration option for escape_html instead of having to use the Hamlit::Utils.escape_html method?
There is already escape_html
option and it works. For your usecase, following template is enough.
<script>
#{'<script>'}
Hamlit::Engine.options[:escape_html] = escape_html
eval Hamlit::Engine.new.call("<script>\n\#{'<script>'}")
<script>
<script>
<script>
<script>
Added option to test it in master. https://github.com/k0kubun/hamlit/commit/89a58078470c7949f4078fb5442a4fed3f3828de Please check the compatibility in the following way.
$ cat in.haml
<script>
#{'<script>'}
$ haml -t ugly in.haml
<script>
<script>
$ bundle exec hamlit render --escape-html=false in.haml
<script>
<script>
$ haml -t ugly -e in.haml
<script>
<script>
$ bundle exec hamlit render --escape-html=true in.haml
<script>
<script>
would it also be possible to use the global configuration option for escape_html instead of having to use the Hamlit::Utils.escape_html method?