me
/
guix
Archived
1
0
Fork 0

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>
master
Nicolas Graves 2024-04-19 01:06:37 +02:00 committed by Ludovic Courtès
parent 44c8ce8334
commit 5f03cfacd8
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 4 additions and 3 deletions

View File

@ -380,9 +380,10 @@ LENGTH characters."
(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)