[bug#70715,4/4] guix: End package descriptions with period.
Commit Message
* 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(+)
@@ -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