chore: enforce brackets for if clause and for/while loops

This commit is contained in:
Ilia Mashkov
2026-04-17 13:05:36 +03:00
parent cfaff46d59
commit 12e8bc0a89
25 changed files with 213 additions and 70 deletions
@@ -127,7 +127,9 @@ export class TextLayoutEngine {
// Both cursors are grapheme-level: start is inclusive, end is exclusive.
for (let sIdx = start.segmentIndex; sIdx <= end.segmentIndex; sIdx++) {
const segmentText = prepared.segments[sIdx];
if (segmentText === undefined) continue;
if (segmentText === undefined) {
continue;
}
const graphemes = Array.from(this.#segmenter.segment(segmentText), s => s.segment);
const advances = breakableFitAdvances[sIdx];