You can do this with the "succeed" solution that Nathan initially
posted:

= succeed "," do
  %span.class1 Foo
%span.class2 Bar

On Jan 14, 10:56 am, Dan Dofter <[email protected]> wrote:
> I'm having a similar issue.  I have code that looks like:
>
> %span.class1 Foo
> ,
> %span.class2 Bar
>
> Just like in Jacob's case, I'm getting a space before the comma in the
> output:
>
> Foo , Bar
>
> I can work around it by doing:
>
> %span.class1> Foo
> ,
> %span.class2 Bar
>
> However, that removes whitespace before the first span which I'd like
> to avoid.
>
> Any thoughts?
>
> Thanks,
> Dan
>
> On Jan 9, 2:17 pm, "Nathan Weizenbaum" <[email protected]> wrote:
>
> > The problem is, that would actually generate
>
> >   Some textcool link, some more text
>
> > 'cause it would eat the whitespace between "text" and "cool". Since I'd
> > rather not add yet another completely-different whitespace-nuking
> > construction, I think what we've got is good enough.
>
> > On Fri, Jan 9, 2009 at 9:00 AM, Jacob <[email protected]> wrote:
>
> > > Ok, thanks!
>
> > > Feature request: add the white-space eating control characters to the
> > > standalone equals character like so:
>
> > > .my_class
> > >  Some text
> > >  >= link_to 'cool link', :action => 'awesome'
> > >  , some more text
>
> > > Yielding: Some text cool link, some more text
>
> > > (or was that <= or ><= ? ;)
>
> > > Thanks!
>
> > > On Jan 8, 6:00 pm, "Nathan Weizenbaum" <[email protected]> wrote:
> > > > You could either do
>
> > > > .my_class
> > > >   == Some text #{link_to 'cool link', :action => 'awesome'}, some more
> > > text
>
> > > > or
>
> > > > .my_class
> > > >   Some text
> > > >   = succeed ',' do
> > > >     = link_to 'cool link', :action => 'awesome'
> > > >   some more text
>
> > > > On Thu, Jan 8, 2009 at 5:20 PM, Jacob <[email protected]> wrote:
>
> > > > > I find myself oftentimes writing things equivalent to:
>
> > > > > .my_class
> > > > >  Some text
> > > > >  = link_to 'cool link', :action => 'awesome'
> > > > >  , some more text
>
> > > > > Unfortunately, the comma after the link ends up with a space before
> > > > > it:
>
> > > > >  Some text awesome , some more text
>
> > > > > How is this best resolved?
>
> > > > > Thanks!
>
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to