Skip to content

Commit

Permalink
Show term for "from" when module/lang/reader
Browse files Browse the repository at this point in the history
  • Loading branch information
greghendershott committed Nov 19, 2024
1 parent 46728bb commit 4cf572e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions racket/scribble.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,8 @@
(values what from fams pkg sort-order)]
[(index-desc? desc)
(define ht (index-desc-extras desc))
(define what (match (hash-ref ht 'module-kind #f)
(define module-kind (hash-ref ht 'module-kind #f))
(define what (match module-kind
['lib "module"]
['lang "language"]
['reader "reader"]
Expand All @@ -236,12 +237,15 @@
(match (hash-ref ht 'display-from-libs #f)
[(? list? contents)
(string-join (map content->string contents) ", ")]
[#f (doc-from)]))
[#f
(match module-kind
[(or 'lib 'lang 'reader) term]
[_ (doc-from)])]))
(define fams (match (hash-ref ht 'language-family #f)
[(? list? fams) (string-join (map ~a fams) ", ")]
[#f "Racket"]))
(define pkg (lib-pkg
(match (hash-ref ht 'module-kind #f)
(match module-kind
['lib (string->symbol term)]
[_ #f])))
(define sort-order (hash-ref ht 'sort-order 0))
Expand Down

0 comments on commit 4cf572e

Please sign in to comment.