mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-16 15:44:16 -06:00
use apply line adjustment when calling SmartIndenter
This commit is contained in:
parent
edd35f01ca
commit
4ba24fb7d4
@ -237,9 +237,10 @@ module ts.formatting {
|
||||
|
||||
// determine child indentation
|
||||
// TODO: share this code with SmartIndenter
|
||||
// NOTE: SI uses non-adjusted lines
|
||||
var increaseIndentation =
|
||||
childStartLine !== nodeStartLine &&
|
||||
!SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement(node, child, childStartLine, sourceFile) &&
|
||||
!SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement(node, child, childStartLine + 1, sourceFile) &&
|
||||
SmartIndenter.shouldIndentChildNode(node, child);
|
||||
|
||||
processNode(child, childContextNode, childStartLine, increaseIndentation ? indentation + options.IndentSize : indentation);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user