From aeb413abb477cbde1dba18d4af49a9585293bf5f Mon Sep 17 00:00:00 2001 From: LordBaryhobal Date: Fri, 21 Nov 2025 16:50:46 +0100 Subject: [PATCH] added bit separators --- src/render/structure.typ | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/src/render/structure.typ b/src/render/structure.typ index 68e9b52..d896801 100644 --- a/src/render/structure.typ +++ b/src/render/structure.typ @@ -36,13 +36,31 @@ name: str(rank) ) - // Range boundaries - if rank in boundaries and j != struct.bits - 1 { - draw.line( - str(rank) + ".north-east", - str(rank) + ".south-east", - stroke: config.border-color - ) + if j != struct.bits - 1 { + let top = str(rank) + ".north-east" + let bottom = str(rank) + ".south-east" + + // Group boundary + if rank in boundaries { + draw.line( + top, + bottom, + stroke: config.border-color + ) + + // Bit separator + } else { + draw.line( + top, + ((), 20%, bottom), + stroke: config.border-color + ) + draw.line( + bottom, + ((), 20%, top), + stroke: config.border-color + ) + } } } })