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 0fc3888 + 65561a8 commit 1bfc472Copy full SHA for 1bfc472
src/services/classifier.ts
@@ -499,8 +499,10 @@ namespace ts {
499
return { spans, endOfLineState: EndOfLineState.None };
500
501
function pushClassification(start: number, end: number, type: ClassificationType): void {
502
+ const length = end - start;
503
+ Debug.assert(length > 0, `Classification had non-positive length of ${length}`);
504
spans.push(start);
- spans.push(end - start);
505
+ spans.push(length);
506
spans.push(type);
507
}
508
0 commit comments