do not consider positions that fall to leading trivia in brace matching

This commit is contained in:
Vladimir Matveev 2014-09-29 22:49:05 -07:00
parent d988012ea3
commit c298f09276

View File

@ -4022,7 +4022,7 @@ module ts {
var sourceFile = getCurrentSourceFile(filename);
var result: TypeScript.TextSpan[] = [];
var token = getTouchingToken(sourceFile, position, /*allowPositionInLeadingTrivia*/ true);
var token = getTouchingToken(sourceFile, position, /*allowPositionInLeadingTrivia*/ false);
if (token.getStart(sourceFile) === position) {
var matchKind = getMatchingTokenKind(token);