GNU bug report logs - #70462
[PATCH] import: beautify-description: Fix ". ." case.

Previous Next

Package: guix-patches;

Reported by: Nicolas Graves <ngraves <at> ngraves.fr>

Date: Thu, 18 Apr 2024 23:08:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

To reply to this bug, email your comments to 70462 AT debbugs.gnu.org.
There is no need to reopen the bug first.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#70462; Package guix-patches. (Thu, 18 Apr 2024 23:08:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Nicolas Graves <ngraves <at> ngraves.fr>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Thu, 18 Apr 2024 23:08:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: guix-patches <at> gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH] import: beautify-description: Fix ". ." case.
Date: Fri, 19 Apr 2024 01:06:37 +0200
* guix/import/utils.scm (beautify-description): Ensure the matched
string pre is long enough not to fail.

Change-Id: I3172d9a41350b98222cd9ab758487485f26650b3
---
 guix/import/utils.scm | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/guix/import/utils.scm b/guix/import/utils.scm
index 0cf52cdbde..09a01cf315 100644
--- a/guix/import/utils.scm
+++ b/guix/import/utils.scm
@@ -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)
-- 
2.41.0





Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Mon, 29 Apr 2024 21:58:02 GMT) Full text and rfc822 format available.

Notification sent to Nicolas Graves <ngraves <at> ngraves.fr>:
bug acknowledged by developer. (Mon, 29 Apr 2024 21:58:02 GMT) Full text and rfc822 format available.

Message #10 received at 70462-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Nicolas Graves <ngraves <at> ngraves.fr>
Cc: 70462-done <at> debbugs.gnu.org
Subject: Re: [bug#70462] [PATCH] import: beautify-description: Fix ". ." case.
Date: Mon, 29 Apr 2024 23:56:38 +0200
Nicolas Graves <ngraves <at> ngraves.fr> skribis:

> * guix/import/utils.scm (beautify-description): Ensure the matched
> string pre is long enough not to fail.
>
> Change-Id: I3172d9a41350b98222cd9ab758487485f26650b3

Applied, thanks!




This bug report was last modified 4 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.