PugJS new line in Webstorm

Hello,

 

I am trying to add a new line inside parenthesis: 

div(ng-class="{'col-xs-4': enemies.length === 3," +
" 'col-xs-6': enemies.length === 2}

Adding a new line also adds double quotes and a plus sign( " + " ), how do I remove this behavior?

 

0

Hmm... this is by design - just a line break here would result in

div(ng-class="{'col-xs-4': enemies.length === 3,
'col-xs-6': enemies.length === 3}")

which causes `Syntax Error: Unterminated string constant` error when compiling

1

Ok, I tested it again and you are right. I can add a line break for each attribute, but not for each property in an object. Thanks

0

请先登录再写评论。