racket/scribble
Use syntax-span and syntax-position to compute the tail space in a list
Offen
#386 geöffnet am 09.12.2023
good first issue
Repository-Metriken
- Stars
- (250 Sterne)
- PR-Merge-Metriken
- (Durchschn. Merge 12h 51m) (1 gemergte PR in 30 T)
Beschreibung
@racketblock[( a b cde )]
is currently rendered as:
( a b cde)
The spaces between "cde" and ")" are missing.
One possible fix:
- use
syntax-positionto find that the position of "( a .... )" isxwith the span of16 - use
syntax-positionto find that the position of "cde" isx + 10with the span of3 - So there should be
16 - ((x + 10) - x) - 3 - 1= 2 spaces between "cde" and ")". - More generally: the quantity is
whole-span - (last-pos - whole-pos) - last-span - 1. - The spaces must be added before ")" is written. Somewhere before https://github.com/racket/scribble/blob/bdffb99ca49ed17be8198f2376e6bf6b199cb813/scribble-lib/scribble/racket.rkt#L788