You need to use the #preserve helper: https://gist.github.com/1439820

On Tue, Dec 6, 2011 at 2:18 AM, Szymon Nowak <szi...@gmail.com> wrote:

> Hi,
>
> I'm trying to display js snippet in my view using :escaped filter. I've
> got HTML similar to this:
>
> %div
>   %pre
>     %code
>       :escaped
>         <script>
>           var a = 1;
>         </script>
>
> There are 2 issues:
> 1. How can I display this snippet so it won't be indented? Nesting it
> deeper in more HTML tags makes it more and more indented.
> 2. The first line is actually not indented at all, but all others are. I
> have to manually move the first line by adding few spaces on the left, so
> that its indentation would match the other lines.
>
> Cheers,
> Szymon
>
> --
> You received this message because you are subscribed to the Google Groups
> "Haml" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/haml/-/mvPF2VygAxIJ.
> To post to this group, send email to haml@googlegroups.com.
> To unsubscribe from this group, send email to
> haml+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/haml?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Haml" group.
To post to this group, send email to haml@googlegroups.com.
To unsubscribe from this group, send email to haml+unsubscr...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/haml?hl=en.

Reply via email to