Use syntax-span and syntax-position to compute the tail space in a list
Open
Nobody has claimed this yet.
good first issue
- Dominant language
- Racket
- Stars
- 250
- Forks
- 102
- Avg merge
- 11d 11h
- Merged PRs (30d)
- 1
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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in scribble-lib/scribble/racket.rkt around line 788 and reproduce the @racketblock example from the issue. Trace the syntax-position and syntax-span values for the whole list and its final element; done means the missing spaces appear before the closing parenthesis.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100