mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-15 20:25:23 -06:00
indent argument lists if they are on different line with parent
This commit is contained in:
parent
e830ae28b7
commit
31e256f23f
@ -281,7 +281,13 @@ module ts.formatting {
|
||||
var tokenInfo = formattingScanner.readTokenInfo(node);
|
||||
if (tokenInfo.token.kind === listStartToken) {
|
||||
// make sure that this token does not belong to the child
|
||||
doConsumeTokenAndAdvanceScanner(tokenInfo, node, nodeIndentation);
|
||||
var startTokenIndentation = nodeIndentation;
|
||||
var tokenStartLine = sourceFile.getLineAndCharacterFromPosition(tokenInfo.token.pos).line;
|
||||
if (node.parent.kind !== SyntaxKind.SourceFile && tokenStartLine !== nodeStartLine) {
|
||||
var indentation = nodeIndentation.getIndentation() + options.IndentSize;
|
||||
startTokenIndentation = getDynamicIndentation(node, indentation, indentation, nodeIndentation);
|
||||
}
|
||||
doConsumeTokenAndAdvanceScanner(tokenInfo, node, startTokenIndentation);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -301,6 +307,7 @@ module ts.formatting {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user