From c7c777f5fa24c1e102a89d3b9ff3df46bf3f90d0 Mon Sep 17 00:00:00 2001 From: rajayonin Date: Mon, 20 Oct 2025 19:04:54 +0200 Subject: [PATCH] ensure first and last bits are included when `all-bit-i` is set --- src/renderer.typ | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/renderer.typ b/src/renderer.typ index 5afda4f..6f0e793 100644 --- a/src/renderer.typ +++ b/src/renderer.typ @@ -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) {