I think, this syntax will be nice:
%p
To sign up please
%a{:nospace} follow this link
\.
Only tricky thing here is to understand, where to set spaces, and
where not. In this example, I want to have space before, but not
after.
My proposed way is to look at last space in previous line. If last
symbol is space, than there must be space in HTML. If there is no
space, than tags should be next to each other.
This solution may be not brilliant, but is already well-known between
HTML coders :)
Maybe you have better solution?
On Jul 24, 4:30 pm, Frederick <[EMAIL PROTECTED]> wrote:
> In the first example there's no need to use the link_to helper instead
> of %a, of course.
>
> On Jul 24, 3:28 pm, Frederick <[EMAIL PROTECTED]> wrote:
>
> > Hi, yes, this is one of the culprits of Haml IMO right now. We've
> > talked about it before pretty extensively, most recently I commented
> > on Nathan's blog:
>
> >http://nex3.leeweiz.net/posts/13#comments
>
> > Which sums it up pretty good. Right now you can use these methods to
> > get rid of the unwanted whitespace:
>
> > * precede/succeed helpers, succeed looks like this:
> > = succeed '.' do
> > To sign up
> > = link_to 'click here', path
>
> > * To sign up
> > = link_to('click here', path) + '.'
> > or of course
> > = 'To sign up ' + link_to('click here', path) + '.'
>
> > * == To sign up #{link_to 'click here', path}.
>
> > There are also a fair number of discussions here in the Google Group.
>
> > On Jul 23, 11:04 am, Vlad Rafeyev <[EMAIL PROTECTED]> wrote:
>
> > > Hello!
>
> > > I want to do simple task: have a link (A) inside text (P).
>
> > > The text is: To sign up please follow this link.
>
> > > In HAML its:
> > > %p
> > > To sign up please
> > > %a{} follow this link
> > > \.
>
> > > But when it comes to rendering HTML, HAML inserts spases before and
> > > after my link! So between link and dot symbol there is a unwanted
> > > space!
>
> > > How should I get rid of this?
>
> > > Thank you!
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---