mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-06 02:33:53 -06:00
Fixing first example
This commit is contained in:
parent
b294443c35
commit
b402b63f3a
@ -480,6 +480,8 @@ namespace ts.formatting {
|
||||
case SyntaxKind.CloseBraceToken:
|
||||
case SyntaxKind.OpenBracketToken:
|
||||
case SyntaxKind.CloseBracketToken:
|
||||
case SyntaxKind.OpenParenToken:
|
||||
case SyntaxKind.CloseParenToken:
|
||||
case SyntaxKind.ElseKeyword:
|
||||
case SyntaxKind.WhileKeyword:
|
||||
case SyntaxKind.AtToken:
|
||||
@ -644,7 +646,7 @@ namespace ts.formatting {
|
||||
// consume list start token
|
||||
startLine = sourceFile.getLineAndCharacterOfPosition(tokenInfo.token.pos).line;
|
||||
let indentation =
|
||||
computeIndentation(tokenInfo.token, startLine, Constants.Unknown, parent, parentDynamicIndentation, startLine);
|
||||
computeIndentation(tokenInfo.token, startLine, Constants.Unknown, parent, parentDynamicIndentation, parentStartLine);
|
||||
|
||||
listDynamicIndentation = getDynamicIndentation(parent, parentStartLine, indentation.indentation, indentation.delta);
|
||||
consumeTokenAndAdvanceScanner(tokenInfo, parent, listDynamicIndentation);
|
||||
|
||||
@ -18,4 +18,4 @@ goTo.marker("1");
|
||||
edit.insert("\r\n");
|
||||
goTo.marker("0");
|
||||
// Won't-fixed: Smart indent during chained function calls
|
||||
verify.indentationIs(8);
|
||||
verify.indentationIs(4);
|
||||
@ -46,7 +46,7 @@ verify.currentFileContentIs(
|
||||
" C;\n" +
|
||||
" class C {\n" +
|
||||
" constructor(b\n" +
|
||||
" ) {\n" +
|
||||
" ) {\n" +
|
||||
" }\n" +
|
||||
" foo(a\n" +
|
||||
" : string) {\n" +
|
||||
@ -54,7 +54,7 @@ verify.currentFileContentIs(
|
||||
" || true;\n" +
|
||||
" }\n" +
|
||||
" get bar(\n" +
|
||||
" ) {\n" +
|
||||
" ) {\n" +
|
||||
" return 1;\n" +
|
||||
" }\n" +
|
||||
" }\n" +
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user