Multi-id defform: hidden ids inflate whitespace
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 74/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
調査の方向性
提供された things.rkt と mve.scrbl の再現を使って raco scribble --html mve.scrbl を実行し、defform のレンダリングとインデント動作を追跡します。両方のリンクターゲットモードを確認します。非表示の識別子が継続行のインデントに影響しなくなり、表示される追加の識別子が正しく分離されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Racket
- スター
- 250
- フォーク
- 102
- 平均マージ
- 13日 16時間
- マージ済み PR(30日)
- 2
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
racket/scribble のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 55/100
racket/scribble の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
EchoTools/nevr-runtime#264 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
Automattic/data-liberation-agent#685 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 77/100
Crosstalk-Solutions/project-nomad#1427 ·
メンテナーはふだん 2 日以内に返信
-
automated issue report
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 83/100
kubernetes-sigs/kueue#16990 ·
メンテナーはふだん 1 日以内に返信