This haml
%script{:type => "text/javascript"} :plain $(document).ready(function() { bar(); var foo = foo_func("#{}"); });
as expected, gives the following:
<script type='text/javascript'> $(document).ready(function() { bar(); var foo = foo_func(""); }); </script>
But this ALMOST IDENTICAL HAML (changed only bar() to prep() ):
%script{:type => "text/javascript"} :plain $(document).ready(function() { prep(); var foo = foo_func("#{}"); });
gives the following:
<script type='text/javascript'> $(document).ready(function() { prep(); var foo = foo_func(""); }); </script>
A NOTE OF THE AUXILIARY INdentation in the second case.
Why does changing bar() to prep() cause this weird difference?
source share