File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -2230,7 +2230,7 @@ module ts {
2230
2230
2231
2231
var result : ReferenceEntry [ ] = [ ] ;
2232
2232
2233
- // We'd like to highlight else/ifs together if they are only separated by spaces/tabs
2233
+ // We'd like to highlight else/ifs together if they are only separated by whitespace
2234
2234
// (i.e. the keywords are separated by no comments, no newlines).
2235
2235
for ( var i = 0 ; i < keywords . length ; i ++ ) {
2236
2236
if ( keywords [ i ] . kind === SyntaxKind . ElseKeyword && i < keywords . length - 1 ) {
@@ -2241,8 +2241,7 @@ module ts {
2241
2241
2242
2242
// Avoid recalculating getStart() by iterating backwards.
2243
2243
for ( var j = ifKeyword . getStart ( ) - 1 ; j >= elseKeyword . end ; j -- ) {
2244
- var c = sourceFile . text . charCodeAt ( j ) ;
2245
- if ( c !== CharacterCodes . space && c !== CharacterCodes . tab ) {
2244
+ if ( ! isWhiteSpace ( sourceFile . text . charCodeAt ( j ) ) ) {
2246
2245
shouldHighlightNextKeyword = false ;
2247
2246
break ;
2248
2247
}
You can’t perform that action at this time.
0 commit comments