Haml syntax: split a line to a couple of rows

后端 未结 5 1346
慢半拍i
慢半拍i 2021-01-03 20:15

I use HAML in my rails project for my html templates. I would like to figure out if its possible to divide a very long line and make it a couple of rows:

%a.         


        
5条回答
  •  死守一世寂寞
    2021-01-03 20:52

    New lines can be placed after commas, according to the Haml documentation. So, perhaps something like the following would work:

    %a.open-service{href: '#', 
                    data: { service_name: service.description,
                            balance_type: "coinsurance",
                            total: service.a_total_billed - service.a_rejected - service.a_not_covered, 
                            discount: service} }
    

提交回复
热议问题