Multiple multi-line HAML blocks

后端 未结 4 1835
野的像风
野的像风 2021-01-01 15:43

Using the (intentionally) strange multi-line format for HAML, I\'d like to have the following lines in my template:

= call_to_helper :foo1 => \'bar1\', :f         


        
4条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-01 16:12

    It's a hack (sort-of), but you could always use a "+" instead of a "=" on your 2nd, 3rd, etc. lines in the chain.

    = call_to_helper :foo1 => 'bar1', :foo2 => 'bar2', :foo3 => 'bar3', |
      :foo4 => 'bar4', :foo5 => 'bar5' |
    + call_to_helper :foo1 => 'bar1', :foo2 => 'bar2', :foo3 => 'bar3', |
      :foo4 => 'bar4', :foo5 => 'bar5' |
    

提交回复
热议问题