Follow up: Haml no longer be blowing my spot
Imagine we have the following snippet:
post.cached_content contains some
<pre> tags. As a result, the contents get kind of skewed.
So, it seems you can do something like:
The key here is that we use
~ instead of
= to output stuff. Apparently this is an alias for Haml::Helpers.find_and_preserve. I actually didn’t see any documentation about this alias though.
Looking to the future
Nathan Weizenbaum also pointed out that “Incidentally, as of Haml 1.9 pre and textarea will automatically eschew indentation-management.” Sick!