racket/scribble
Use syntax-span and syntax-position to compute the tail space in a list
Ouverte
#386 ouverte le 9 déc. 2023
good first issue
Métriques du dépôt
- Stars
- (250 étoiles)
- Métriques de merge PR
- (Merge moyen 12h 51m) (1 PR mergée en 30 j)
Description
@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