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.
1 parent c233073 commit a8d25c8Copy full SHA for a8d25c8
src/services/services.ts
@@ -5902,11 +5902,13 @@ module ts {
5902
let end = triviaScanner.getTextPos();
5903
let width = end - start;
5904
5905
- if (textSpanIntersectsWith(span, start, width)) {
5906
- if (!isTrivia(kind)) {
5907
- return;
5908
- }
+ // The moment we get something that isn't trivia, then stop processing.
+ if (!isTrivia(kind)) {
+ return;
+ }
5909
5910
+ // Only bother with the trivia if it at least intersects the span of interest.
5911
+ if (textSpanIntersectsWith(span, start, width)) {
5912
if (isComment(kind)) {
5913
// Simple comment. Just add as is.
5914
result.push({
0 commit comments