[PATCH] import: beautify-description: Fix ". ." case.

  • Done
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Nicolas Graves
Owner
unassigned
Submitted by
Nicolas Graves
Severity
normal

Debbugs page

N
N
Nicolas Graves wrote on 18 Apr 16:06 -0700
(address . guix-patches@gnu.org)(address . ngraves@ngraves.fr)
20240418230641.2612-1-ngraves@ngraves.fr
* 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(-)

Toggle diff (20 lines)
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
L
L
Ludovic Courtès wrote on 29 Apr 14:56 -0700
(name . Nicolas Graves)(address . ngraves@ngraves.fr)(address . 70462-done@debbugs.gnu.org)
87ikzzzvc9.fsf@gnu.org
Nicolas Graves <ngraves@ngraves.fr> skribis:

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

Applied, thanks!
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 70462@patchwise.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 70462
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch