Skip to content

Commit 03f8ea4

Browse files
committed
Merge branch 'release-1.5' of https://github.com/Microsoft/TypeScript into getEmitOutputOut
2 parents 0401553 + 65b7f53 commit 03f8ea4

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/services/services.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6039,11 +6039,13 @@ module ts {
60396039
let end = triviaScanner.getTextPos();
60406040
let width = end - start;
60416041

6042-
if (textSpanIntersectsWith(span, start, width)) {
6043-
if (!isTrivia(kind)) {
6044-
return;
6045-
}
6042+
// The moment we get something that isn't trivia, then stop processing.
6043+
if (!isTrivia(kind)) {
6044+
return;
6045+
}
60466046

6047+
// Only bother with the trivia if it at least intersects the span of interest.
6048+
if (textSpanIntersectsWith(span, start, width)) {
60476049
if (isComment(kind)) {
60486050
// Simple comment. Just add as is.
60496051
pushClassification(start, width, ClassificationType.comment);

0 commit comments

Comments
 (0)