One thing that got me...

I was thinking of the pipe as a line-continuation character.  It's
not.
The pipe has to be on ALL lines - including the last one!

Cheers,
Adam

On Jun 21, 1:23 pm, Nathan Weizenbaum <[EMAIL PROTECTED]> wrote:
> Pipesshould work for everything.
>
> - Nathan
>
> pingva wrote:
> > Thanks!
>
> > I did adapt same approach, with moving all drag-n-drop wiring into the
> > helpers.
>
> > I did try the usingpipesoriginally, but that didn't work and I
> > inferredpipesonly work for markup, but not the ruby code.  Is it not
> > the case?
>
> > On Jun 19, 11:13 pm, Nathan Weizenbaum <[EMAIL PROTECTED]> wrote:
>
> >> Yes, but we advise against it. The nicest way to deal with that is to
> >> refactor the code a bit and move the giant function call to its own
> >> helper. This improves readability. For example,
>
> >> # foos_helper.rb
> >> def origin_input_reciever
>
> >>   drop_receiving_element(:origin_input,
> >>                          :accept=>[:font_chooser,:size_chooser],
> >>                          :hoverclass => 'accept_drop')
>
> >> end
>
> >> -# index.haml
> >> = origin_input_reciever
>
> >> However, if you absolutely *must* include it in the Haml, you can add a
> >> pipe character ("|") to the end of each line:
>
> >> = drop_receiving_element(:origin_input,       |
> >>       :accept=>[:font_chooser,:size_chooser], |
> >>       :hoverclass => 'accept_drop')           |
>
> >> - Nathan
>
> >> pingva wrote:
>
> >>> Hi,
>
> >>> I greatly enjoy using haml & sass, but recently ran into this issue:
>
> >>> I have many lines like this:
>
> >>> =
> >>> drop_receiving_element(:origin_input, 
> >>> :accept=>[:font_chooser,:size_chooser], :hoverclass
> >>> => 'accept_drop')
>
> >>> and it is going to get even longer.  I'd like to wrap it so it looks
> >>> something like this:
>
> >>> = drop_receiving_element(:origin_input,
> >>>       :accept=>[:font_chooser,:size_chooser],
> >>>       :hoverclass => 'accept_drop')
>
> >>> is there a way to do that?
>
> >>> 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