答案 0 :(得分:1)
你是否首先需要那些竖条?我从未在我的Haml文件中以这种方式使用过它们。根据Haml文档,the pipe character designates a multiline string:
%whoo
%hoo= h( |
"I think this might get " + |
"pretty long so I should " + |
"probably make it " + |
"multiline so it doesn't " + |
"look awful.") |
%p This is short.
所以,对于你正在做的事情,只需在你的一个参数之后在行尾添加一个逗号就足以将下一个参数放在下一行的任何地方。