prevent drawing separators on starting lines of fields #17

Open
rajayonin wants to merge 1 commits from rajayonin/rivet-typst:fix-consecutive-ranges into dev
Contributor

On non-consecutive ranges, we were drawing the starting line on top of the separator, which lead to some visual glitches in some viewers (e.g. Chrome).

before
after

On non-consecutive ranges, we were drawing the starting line _on top_ of the separator, which lead to some visual glitches in some viewers (e.g. Chrome). ![before](/attachments/032b58f6-84c8-4670-8f4f-4450cdbe96e0) ![after](/attachments/cba7a173-9ba5-48df-ae0e-54fd08f76abb)
rajayonin added 1 commit 2025-11-20 09:06:13 +00:00
On non-consecutive ranges, we were drawing the starting line _on top_ of
the separator, which lead to some visual glitches in some viewers.
HEL requested changes 2025-11-21 14:02:58 +00:00
src/renderer.typ Outdated
@@ -392,1 +392,4 @@
range-boundaries.push(start-i)
range-boundaries.push(end-i)
}
range-boundaries.dedup()
Owner

Not really useful since we're only checking if an index is in the list later on (line 431/434)

Also, dedup doesn't modify the array in place so the result should be reassigned to the variable

range-boundaries = range-boundaries.dedup()
Not really useful since we're only checking if an index is in the list later on (line 431/434) Also, `dedup` doesn't modify the array in place so the result should be reassigned to the variable ```typst range-boundaries = range-boundaries.dedup() ```
Author
Contributor

Not really useful since we're only checking if an index is in the list later on (line 431/434)

What do you suggest we do instead?

> Not really useful since we're only checking if an index is in the list later on (line 431/434) What do you suggest we do instead?
Owner

It seems like removing duplicates is not really necessary because the only time we read from the list is to check whether it contains particular indices. I'd suggest not calling dedup at all

It seems like removing duplicates is not really necessary because the only time we read from the list is to check whether it contains particular indices. I'd suggest not calling `dedup` at all
Author
Contributor

Ok, done.

Ok, done.
rajayonin marked this conversation as resolved
HEL added the
bug
label 2025-11-21 14:03:33 +00:00
rajayonin added 1 commit 2025-11-24 08:17:53 +00:00
rajayonin force-pushed fix-consecutive-ranges from 3a0331f33b to b6f2fd99b8 2025-11-25 08:02:59 +00:00 Compare
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u fix-consecutive-ranges:rajayonin-fix-consecutive-ranges
git checkout rajayonin-fix-consecutive-ranges
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: HEL/rivet-typst#17
No description provided.