This commit is contained in:
SaschaNaz
2015-12-10 01:32:07 +09:00
parent 76d799cf0d
commit d90a66ca23
+6 -6
View File
@@ -281,8 +281,8 @@ namespace ts.formatting {
* to the initial indentation.
*/
function getOwnOrInheritedDelta(n: Node, options: FormatCodeOptions, sourceFile: SourceFile): number {
let previousLine = Constants.Unknown;
let child: Node;
let previousLine = Constants.Unknown;
let child: Node;
while (n) {
let line = sourceFile.getLineAndCharacterOfPosition(n.getStart(sourceFile)).line;
if (previousLine !== Constants.Unknown && line !== previousLine) {
@@ -385,8 +385,8 @@ namespace ts.formatting {
parentDynamicIndentation: DynamicIndentation,
effectiveParentStartLine: number): Indentation {
let indentation = inheritedIndentation;
var delta = SmartIndenter.shouldIndentChildNode(node) ? options.IndentSize : 0;
let indentation = inheritedIndentation;
var delta = SmartIndenter.shouldIndentChildNode(node) ? options.IndentSize : 0;
if (effectiveParentStartLine === startLine) {
// if node is located on the same line with the parent
@@ -485,8 +485,8 @@ namespace ts.formatting {
else {
indentation -= options.IndentSize;
}
if (SmartIndenter.shouldIndentChildNode(node)) {
if (SmartIndenter.shouldIndentChildNode(node)) {
delta = options.IndentSize;
}
else {