GNU bug report logs - #70715
[PATCH 0/4] Change imported crate style.

Previous Next

Package: guix-patches;

Reported by: Herman Rimm <herman <at> rimm.ee>

Date: Thu, 2 May 2024 12:58:01 UTC

Severity: normal

Tags: patch

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

Bug is archived. No further changes may be made.

Full log


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

From: Herman Rimm <herman <at> rimm.ee>
To: 70715 <at> debbugs.gnu.org
Subject: [PATCH 4/4] guix: End package descriptions with period.
Date: Thu,  2 May 2024 14:59:00 +0200
* guix/import/utils.scm (beautify-description): Append period to last
words which do not end with one.

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

diff --git a/guix/import/utils.scm b/guix/import/utils.scm
index 09a01cf315..e06f06e196 100644
--- a/guix/import/utils.scm
+++ b/guix/import/utils.scm
@@ -370,6 +370,13 @@ (define* (beautify-description description #:optional (length 80))
              (cons* "This" "package"
                     (string-downcase first) rest))
             (_ words)))
+         (new-words
+           (match new-words
+             ((rest ... last)
+              (reverse (cons (if (string-suffix? "." last)
+                               last
+                               (string-append last "."))
+                             (reverse rest))))))
          (cleaned
           (string-join (map fix-word new-words))))
     ;; Use double spacing between sentences
-- 
2.41.0





This bug report was last modified 353 days ago.

Previous Next


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