scan starting from the beginning of target span

This commit is contained in:
Vladimir Matveev 2014-11-14 22:34:36 -08:00
parent 20599e6fe8
commit 9a5df8585b

View file

@ -241,7 +241,7 @@ module ts.formatting {
return start;
}
var precedingToken = findPrecedingToken(enclosingNode.pos, sourceFile);
var precedingToken = findPrecedingToken(originalRange.pos, sourceFile);
// no preceding token found - start from the beginning of enclosing node
return precedingToken ? precedingToken.end : enclosingNode.pos;
}