From d6668221e7ce7b1b1074cb1bb1092bb6e44ec0ac Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Wed, 9 Aug 2023 16:42:23 +0100 Subject: doc: Set identifier on item markup in record documentation. * doc/skribilo.scm (record-documentation): Set identifier on item markup instead of using a separate mark. --- doc/skribilo.scm | 58 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/doc/skribilo.scm b/doc/skribilo.scm index c8aade0..972b626 100644 --- a/doc/skribilo.scm +++ b/doc/skribilo.scm @@ -259,38 +259,38 @@ are a list of objects." identifier)) (make-irritants-condition unknown-fields))))) ;; Generate markup. - (item #:key (let ((identifier (symbol->string identifier))) - (list (list "Record Type: " - (mark identifier) + (let ((identifier (symbol->string identifier))) + (item #:ident identifier + #:key (list (list "Record Type: " (index #:note "record type" identifier) (source-ref file (string-append "\\(define-record-type\\* " identifier) - (code identifier))))) - (apply description - (map (lambda (documented-field) - (let* ((identifier (record-field-identifier documented-field)) - (record-field (find (lambda (field) - (eq? (record-field-identifier field) - (string->symbol identifier))) - (record-fields record)))) - (item #:key - (cond - ;; No default value - ((no-default? (record-field-default record-field)) - (code identifier)) - ;; Default value in documentation - ((record-field-default documented-field) - => (lambda (default) - (list (append (list (code identifier) " (Default: ") - default - (list ")"))))) - ;; Default value from the source - (else (list (list (code identifier) " (Default: " - (code (expression->string - (record-field-default record-field))) - ")")))) - (record-field-documentation documented-field)))) - fields))))) + (code identifier)))) + (apply description + (map (lambda (documented-field) + (let* ((identifier (record-field-identifier documented-field)) + (record-field (find (lambda (field) + (eq? (record-field-identifier field) + (string->symbol identifier))) + (record-fields record)))) + (item #:key + (cond + ;; No default value + ((no-default? (record-field-default record-field)) + (code identifier)) + ;; Default value in documentation + ((record-field-default documented-field) + => (lambda (default) + (list (append (list (code identifier) " (Default: ") + default + (list ")"))))) + ;; Default value from the source + (else (list (list (code identifier) " (Default: " + (code (expression->string + (record-field-default record-field))) + ")")))) + (record-field-documentation documented-field)))) + fields)))))) (define (record-ref identifier) "Link to record documentation of record identified by -- cgit v1.2.3