mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-27 04:59:27 -05:00
import: beautify-description: Fix ". ." case.
* guix/import/utils.scm (beautify-description): Ensure the matched string pre is long enough not to fail. Change-Id: I3172d9a41350b98222cd9ab758487485f26650b3 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
44c8ce8334
commit
5f03cfacd8
1 changed files with 4 additions and 3 deletions
|
@ -380,9 +380,10 @@ (define* (beautify-description description #:optional (length 80))
|
|||
(abbrevs '("Dr" "Mr" "Mrs"
|
||||
"Ms" "Prof" "vs"
|
||||
"e.g")))
|
||||
(if (or (any (cut string-suffix? <> pre) abbrevs)
|
||||
(char-upper-case?
|
||||
(string-ref pre (1- (string-length pre)))))
|
||||
(if (and (> (string-length pre) 0)
|
||||
(or (any (cut string-suffix? <> pre) abbrevs)
|
||||
(char-upper-case?
|
||||
(string-ref pre (1- (string-length pre))))))
|
||||
". "
|
||||
". ")))
|
||||
'post)
|
||||
|
|
Loading…
Reference in a new issue