Support for non-consecutive ranges #13

Merged
HEL merged 2 commits from rajayonin/rivet-typst:non-consecutive-ranges into dev 2025-10-21 06:02:04 +00:00
Showing only changes of commit c7c777f5fa - Show all commits

View File

@@ -407,6 +407,11 @@
indices.push(r.start)
indices.push(r.end)
}
// ensure first and last bits are included
if not indices.contains(0) { indices.insert(0, struct.start) }
if not indices.contains(struct.bits + struct.start - 1) {
indices.push(struct.bits + struct.start - 1)
}
}
for i in range(struct.bits) {