Multi-id defform: hidden ids inflate whitespace
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 74/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- documentation
Hướng nghiên cứu
Chạy raco scribble --html mve.scrbl bằng reproduction things.rkt và mve.scrbl được cung cấp, sau đó theo dõi cách render và hành vi thụt lề của defform. Kiểm tra cả hai chế độ đích liên kết. Hoàn tất khi các identifier bị ẩn không còn ảnh hưởng đến thụt lề của các dòng tiếp nối, trong khi các identifier bổ sung hiển thị được phân tách chính xác.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Racket
- Star
- 251
- Fork
- 101
- Merge trung bình
- 6 ngày 22 giờ
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của racket/scribble
-
In source strcut*-doc does not convert to defstruct* properly when #:constructor-name is usedĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 55/100
Tất cả issue của racket/scribble
Issue tương tự
-
documentation P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
daniel-ospina/tortoise#9038 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
drevendev/HungryCrab#273 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
drevendev/BeautifulRepo#19 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 2 ngày