Refactor author-format function

This commit is contained in:
tux
2025-01-23 23:08:15 +01:00
parent e6725b84d4
commit a368a3c589
2 changed files with 11 additions and 9 deletions

View File

@ -209,7 +209,7 @@
#(make-on-the-fly-markup
(lambda (layout props m)
(interpret-markup layout props
(make-justify-string-markup (format-author layout (chain-assoc-get 'index:text props #f) #f))))
(make-justify-string-markup (format-author (ly:output-def-lookup layout 'authorFormat) (chain-assoc-get 'index:text props #f) #f))))
(make-null-markup))
\vspace #.4
}
@ -317,7 +317,7 @@ headerToTOC = #(define-music-function (parser location header label) (ly:book? s
(ly:string-substitute "\"" "\\\"" field))
"\"")))
(define (format-authors authorIds)
(string-join (map (lambda (authorId) (format-author layout authorId #f)) authorIds) ", "))
(string-join (map (lambda (authorId) (format-author (ly:output-def-lookup layout 'authorFormat) authorId #f)) authorIds) ", "))
(define cr-regex (ly:make-regex "\r"))
(define crlf-regex (ly:make-regex "\r\n"))
(define para-sep-regex (ly:make-regex "\n[ \t\n]*\n[ \t\n]*"))