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.
I just came accross this question, I was having the same issue but the selected answer didn't help me. So I'm just building upon Mikhail's answer. If you have very long attributes that are not separated by commas (say you're using something like angularjs), you can split it on several lines by adding + |
at the end of each line (including the last line in this multiline block, which is the tricky part).
Just like this :
%select{ ng: { model: "my_model_name",
options: "myitem as myitem.formattedName for myitem in container.item_list() | " + |
"without: another_list.item_list()" }} |
You can read about this in HAML documentation.