racket/scribble
Use syntax-span and syntax-position to compute the tail space in a list
开放
#386 创建于 2023年12月9日
good first issue
仓库指标
- 星标
- (250 个星标)
- PR 合并指标
- (平均合并 12小时 51分钟) (30 天内合并 1 个 PR)
描述
@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