[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#62202] [PATCH 20/21] import: utils: Rule out texinfo common syntax
From: |
Nicolas Graves |
Subject: |
[bug#62202] [PATCH 20/21] import: utils: Rule out texinfo common syntax from @ escape. |
Date: |
Wed, 15 Mar 2023 13:51:29 +0100 |
---
guix/import/juliahub.scm | 5 +----
guix/import/utils.scm | 8 +++++++-
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/guix/import/juliahub.scm b/guix/import/juliahub.scm
index 06574db724..0d3f89ad61 100644
--- a/guix/import/juliahub.scm
+++ b/guix/import/juliahub.scm
@@ -197,10 +197,7 @@ (define %juliahub-beautify-description-rules
(li . ,(lambda args
`("\n@item" ,@(cdr args))))
(code . ,(lambda args
- (string-append
- "@code{"
- (string-join (cdr args) " ")
- "}")))
+ `("@code{" ,@(cdr args) "}")))
(*text* . ,(lambda (tag x) x))
(*default* . ,(lambda (tag . body)
(cons tag body)))))
diff --git a/guix/import/utils.scm b/guix/import/utils.scm
index 171dca54e8..5ed1dfd815 100644
--- a/guix/import/utils.scm
+++ b/guix/import/utils.scm
@@ -376,7 +376,13 @@ (define* (beautify-description description #:optional
(length 80))
(cut string-trim-both <> #\')
;; Escape single @ to prevent it from being understood as
;; invalid Texinfo syntax.
- (cut regexp-substitute/global #f "@" <> 'pre "@@" 'post)))))
+ (lambda (word)
+ (if
+ (member word '("@itemize" "@item" "@end" "@quotation"
+ "@enumerate" "@code" "@code{"))
+ word
+ ((cut regexp-substitute/global
+ #f "@" <> 'pre "@@" 'post) word)))))))
(words
(string-tokenize (string-trim-both description)
(char-set-complement
--
2.39.2
- [bug#62202] [PATCH 05/21] import: juliahub: Add indirect dependencies., (continued)
- [bug#62202] [PATCH 05/21] import: juliahub: Add indirect dependencies., Nicolas Graves, 2023/03/15
- [bug#62202] [PATCH 08/21] import: juliahub: Simplify juliahub dependency management., Nicolas Graves, 2023/03/15
- [bug#62202] [PATCH 10/21] import: juliahub: Add functions to parse the git repo for a git tag., Nicolas Graves, 2023/03/15
- [bug#62202] [PATCH 07/21] import: juliahub: Filter out julia stdlibs., Nicolas Graves, 2023/03/15
- [bug#62202] [PATCH 12/21] import: juliahub: Handle the case where we have a subdirectory., Nicolas Graves, 2023/03/15
- [bug#62202] [PATCH 13/21] import: juliahub: Add support for versions for juliahub-fetch., Nicolas Graves, 2023/03/15
- [bug#62202] [PATCH 16/21] import: juliahub: Beautify description., Nicolas Graves, 2023/03/15
- [bug#62202] [PATCH 18/21] import: juliahub: Fix version management., Nicolas Graves, 2023/03/15
- [bug#62202] [PATCH 14/21] import: juliahub: Filter out stdlibs from test-dependencies., Nicolas Graves, 2023/03/15
- [bug#62202] [PATCH 15/21] import: juliahub: More robust toml regex parser., Nicolas Graves, 2023/03/15
- [bug#62202] [PATCH 20/21] import: utils: Rule out texinfo common syntax from @ escape.,
Nicolas Graves <=
- [bug#62202] [PATCH 17/21] import: juliahub: Fix license management., Nicolas Graves, 2023/03/15
- [bug#62202] [PATCH 21/21] import: juliahub: output package names as symbols., Nicolas Graves, 2023/03/15
- [bug#62202] [PATCH 19/21] import: juliahub: Fix undefined homepages., Nicolas Graves, 2023/03/15