Multi-id defform: hidden ids inflate whitespace
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 74/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Área
- documentation
Línea de trabajo
Ejecuta raco scribble --html mve.scrbl usando la reproducción proporcionada de things.rkt y mve.scrbl, y luego sigue el renderizado y el comportamiento de indentación de defform. Comprueba ambos modos de destino de enlace. Se considera terminado cuando los identificadores ocultos ya no afectan a la indentación de las líneas de continuación, mientras que los identificadores adicionales visibles se separan correctamente.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
defform was updated in 1b40fc8 to allow a single defform to serve as the link target for multiple identifiers, allowing it to document new forms that might create multiple bindings, similar to defstruct.
When a defform's #:id [(id ...) ids-expr] lists identifiers that do not appear in the form datum, they are attached to the first defining instance in the datum. Two visible effects follow:
-
With link targets on, the extra ids are not displayed, but their width is still counted when the following lines of a multi-line form are positioned. Every continuation line is pushed right by the combined length of the hidden ids.
-
With
#:link-target? #f, the extra ids are typeset visibly, they all get run together after the first id with no separators.
The single-id mode, and the multi-id mode where every listed id appears in the datum, render correctly.
Given a things.rkt…
#lang racket/base
(provide point point? point-x point-y)
(define-syntax-rule (point . _) (void))
(define (point? v) #t)
(define (point-x p) 0)
(define (point-y p) 0)
…The following mve.scrbl file:
#lang scribble/manual
@(require (for-label racket/base "things.rkt"))
@defmodule["things.rkt" #:packages ()]
@defform[#:link-target? #f
#:id [(point) (list #'point)]
(define-thing point (x
y))]{
Control: every listed id appears in the form. Continuation line is indented
correctly.
}
@defform[#:id [(point point? point-x point-y) (list #'point #'point? #'point-x #'point-y)]
(define-thing point (x
y))]{
Continuation line is indented by an extra 20 characters, the combined length
of @racket[point?], @racket[point-x] and @racket[point-y].
}
@defform[#:link-target? #f
#:id [(point point? point-x point-y) (list #'point #'point? #'point-x #'point-y)]
(define-thing point (x
y))]{
Same as above with @racket[#:link-target? #f]: the ids that do not appear in
the form are typeset visibly, concatenated after the first one.
}
…renders with raco scribble --html mve.scrbl as:
In the first box, y is indented 21 columns. In the second and third boxes it is indented 41. The difference of 20 is point? (6) + point-x (7) + point-y (7).
Racket v9.3, scribble-lib 1.65.
- Lenguaje dominante
- Racket
- Estrellas
- 250
- Forks
- 102
- Merge medio
- 13 d 16 h
- PR fusionados (30 d)
- 2
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de racket/scribble
-
In source strcut*-doc does not convert to defstruct* properly when #:constructor-name is usedAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
-
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 55/100
Todos los issues de racket/scribble
Issues similares
-
triage-needed
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
MicrosoftDocs/edge-developer#3970 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 66/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
crazy-goat/rabbit-stream#753 ·
Los mantenedores suelen responder en 1 día
-
agent-research-recommend agent-review-finding chore
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
jordansmall/spindrift#4821 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
[workshop-sim] Repair: Add a fallback sample .lock.yml to the Agentic Workflows Intro Activity 1Abiertofeedback simulation workshop
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
githubnext/gh-aw-workshop#4328 ·
Los mantenedores suelen responder en 1 día