Before:
var obj = {
fooooooooo:
function(x) { return x.zIsTooLongForOneLineWithTheDeclarationLine(); }
};
After:
var obj = {
fooooooooo: function(x) {
return x.zIsTooLongForOneLineWithTheDeclarationLine();
}
};
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222892
91177308-0d34-0410-b5e6-
96231b3b80d8
return 0;
if (Left.is(tok::colon) && Left.is(TT_ObjCMethodExpr))
return Line.MightBeFunctionDecl ? 50 : 500;
+ if (Left.is(tok::colon) && Left.is(TT_DictLiteral))
+ return 100;
if (Left.is(tok::l_paren) && InFunctionDecl && Style.AlignAfterOpenBracket)
return 100;
" //\n"
" a\n"
"};");
+ verifyFormat("var obj = {\n"
+ " fooooooooo: function(x) {\n"
+ " return x.zIsTooLongForOneLineWithTheDeclarationLine();\n"
+ " }\n"
+ "};");
}
TEST_F(FormatTestJS, SpacesInContainerLiterals) {