Another way is to use the succeed helper. E.g.:
Visit
= succeed "." do
%a my website
Possibly not as pretty as Nathan's answer, but you may find it easier
to work with in some cases, e.g.: if what you're doing involves more
complex haml, like this contrived example:
Visit
= succeed "." do
%a
%b
%i my
website
Nathan Weizenbaum wrote:
> When you're writing text like this with inline formatting, it's really
> better to forgo Haml's nested syntax entirely and use a filter like
> :markdown or :textile. For example:
>
> :markdown
> Visit [my website](http://my-websites-url.com).
>
> Haml is built to make structured markup fast and easy, but inline markup
> isn't structured in the same way that layout is, so using another tool
> is the right choice.
>
> Jeff B. wrote:
> > Hi,
> >
> > Is it possible to emit something like this with Haml: "Visit <a>my
> > website</a>." ??
> >
> > If I do
> > Visit
> > %a my website
> > \.
> > Then I get "visit <a>my website</a> ."
> >
> > If I do
> > Visit
> > %a> my website
> > \.
> > Then I get "visit<a>my website</a>."
> >
> > Thanks,
> > Jeff
> >
> > >
> >
> >
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---