Haml has a built-in helper (meaning it's available even if you aren't
using Rails) that's just for stuff like this. It's called "succeed," and
it makes a block of Haml succeeded directly by some text. For example:
= succeed '.' do
%a{:href=>foo_link}Foo
That'll output what you're looking for. There are also similar helpers
called "precede" and "surround," which do just what they sound like.
More documentation is available on the website:
http://haml.hamptoncatlin.com/docs/rdoc.
- Nathan
Simon wrote:
> What about this variation...
>
> I want the following output:
> <a href="foo.html">Foo</a>.
>
> my haml is this:
> %a{:href=>foo_link}Foo
> .
>
> which gives me this of course:
> <a href="foo.html">Foo</a>
> .
>
> Can I make the line break before the . go away without resorting to an
> <a href= etc in the markup? I'm not using rails if that makes a
> difference.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Haml" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/haml?hl=en
-~----------~----~----~----~------~----~------~--~---