unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#70462] [PATCH] import: beautify-description: Fix ". ." case.
@ 2024-04-18 23:06 Nicolas Graves via Guix-patches via
  2024-04-29 21:56 ` bug#70462: " Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2024-04-18 23:06 UTC (permalink / raw)
  To: 70462; +Cc: ngraves

* 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





^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#70462: [PATCH] import: beautify-description: Fix ". ." case.
  2024-04-18 23:06 [bug#70462] [PATCH] import: beautify-description: Fix ". ." case Nicolas Graves via Guix-patches via
@ 2024-04-29 21:56 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2024-04-29 21:56 UTC (permalink / raw)
  To: Nicolas Graves; +Cc: 70462-done

Nicolas Graves <ngraves@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!




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-04-29 21:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-18 23:06 [bug#70462] [PATCH] import: beautify-description: Fix ". ." case Nicolas Graves via Guix-patches via
2024-04-29 21:56 ` bug#70462: " Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).