Because HTML is whitespace-independent, though, this shouldn't be too
much of a problem. If you need there to be no whitespace, you can use
the precede, succeed, and surround helpers:
= precede ':' do
%strong foo
= succeed '!' do
%em bar
= surround '(', ')' do
%a{ :href => 'http://haml.hamptoncatlin.com } Haml
makes
:<strong>foo</strong>
<em>bar</em>!
(<a href='http://haml.hamptoncatlin.com'>Haml</a>)
- Nathan
As to your idea of "textilize", that's actually already implemented in
v1.4 (what will be released as 1.5) as filters. Both textile and
markdown are available by default, as long as you have RedCloth and/or
BlueCloth installed. The syntax is
:textile
This is some *strong* text, and this is some _emphasized_ text.
This minimizes the need for specific syntax to define style, which is
also advantageous because Haml is really designed to emphasize the
structure of a document, rather than the presentation.
- Nathan
- Nathan