apply suppression to tokens

This commit is contained in:
SaschaNaz
2015-09-13 04:02:18 +09:00
parent 07fbf8bfd1
commit f2329846cb
+5 -3
View File
@@ -387,9 +387,7 @@ namespace ts.formatting {
let indentation = inheritedIndentation;
if (indentation === Constants.Unknown) {
if (SmartIndenter.shouldInheritParentIndentation(parent, node) ||
SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement(parent, node, startLine, sourceFile)) {
if (SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement(parent, node, startLine, sourceFile)) {
indentation = parentDynamicIndentation.getIndentation();
}
else {
@@ -590,6 +588,10 @@ namespace ts.formatting {
return inheritedIndentation;
}
if (SmartIndenter.shouldInheritParentIndentation(parent, child)) {
parentDynamicIndentation = getDynamicIndentation(parent, parentStartLine, indentation, 0);
}
if (isToken(child)) {
// if child node is a token, it does not impact indentation, proceed it using parent indentation scope rules
let tokenInfo = formattingScanner.readTokenInfo(child);