We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0401553 + 65b7f53 commit 03f8ea4Copy full SHA for 03f8ea4
src/services/services.ts
@@ -6039,11 +6039,13 @@ module ts {
6039
let end = triviaScanner.getTextPos();
6040
let width = end - start;
6041
6042
- if (textSpanIntersectsWith(span, start, width)) {
6043
- if (!isTrivia(kind)) {
6044
- return;
6045
- }
+ // The moment we get something that isn't trivia, then stop processing.
+ if (!isTrivia(kind)) {
+ return;
+ }
6046
6047
+ // Only bother with the trivia if it at least intersects the span of interest.
6048
+ if (textSpanIntersectsWith(span, start, width)) {
6049
if (isComment(kind)) {
6050
// Simple comment. Just add as is.
6051
pushClassification(start, width, ClassificationType.comment);
0 commit comments